﻿//********************************************************************************//
//创建日期：<创建日期，2016-05-06>
//创建作者：<郭登杰>
//功能说明：来函公共控件-年度调整申请信息
//********************************************************************************//
using BLL.Access;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Web.Class;
using Entity;
using BLL;

namespace Web.Controls.LAIHAN
{
    public partial class UCLHShenQingXX : System.Web.UI.UserControl, IUCLHOperate
    {
        #region 属性

        /// <summary>
        /// 显示模式:来函流程or审批详情
        /// </summary>
        public eMode Mode { get; set; }

        /// <summary>
        /// 来函类型
        /// </summary>
        public eLaiHanLX LaiHanLX { get; set; }

        /// <summary>
        /// 来函流程
        /// </summary>
        public eLaiHanLCBH LaiHanLC { get; set; }

        /// <summary>
        /// 当前来函信息年
        /// </summary>
        private int Y
        {
            get
            {
                return ViewState["Y"] == null ? -1 : Convert.ToInt32(ViewState["Y"]);
            }
            set
            {
                ViewState["Y"] = value;
            }
        }

        /// <summary>
        /// 申请量M1
        /// </summary>
        public string SQLM1
        {
            get
            {
                return this.sqlM1.Text;
            }
            set
            {
                this.sqlM1.Text = value;
            }
        }

        /// <summary>
        /// 申请量M1
        /// </summary>
        public string SQLM2
        {
            get
            {
                return this.sqlM2.Text;
            }
            set
            {
                this.sqlM2.Text = value;
            }
        }

        /// <summary>
        /// 申请量M3
        /// </summary>
        public string SQLM3
        {
            get
            {
                return this.sqlM3.Text;
            }
            set
            {
                this.sqlM3.Text = value;
            }
        }

        /// <summary>
        /// 申请量M4
        /// </summary>
        public string SQLM4
        {
            get
            {
                return this.sqlM4.Text;
            }
            set
            {
                this.sqlM4.Text = value;
            }
        }

        /// <summary>
        /// 申请量M5
        /// </summary>
        public string SQLM5
        {
            get
            {
                return this.sqlM5.Text;
            }
            set
            {
                this.sqlM5.Text = value;
            }
        }

        /// <summary>
        /// 申请量M6
        /// </summary>
        public string SQLM6
        {
            get
            {
                return this.sqlM6.Text;
            }
            set
            {
                this.sqlM6.Text = value;
            }
        }

        /// <summary>
        /// 申请量M7
        /// </summary>
        public string SQLM7
        {
            get
            {
                return this.sqlM7.Text;
            }
            set
            {
                this.sqlM7.Text = value;
            }
        }

        /// <summary>
        /// 申请量M8
        /// </summary>
        public string SQLM8
        {
            get
            {
                return this.sqlM8.Text;
            }
            set
            {
                this.sqlM8.Text = value;
            }
        }

        /// <summary>
        /// 申请量M9
        /// </summary>
        public string SQLM9
        {
            get
            {
                return this.sqlM9.Text;
            }
            set
            {
                this.sqlM9.Text = value;
            }
        }

        /// <summary>
        /// 申请量M10
        /// </summary>
        public string SQLM10
        {
            get
            {
                return this.sqlM10.Text;
            }
            set
            {
                this.sqlM10.Text = value;
            }
        }

        /// <summary>
        /// 申请量M11
        /// </summary>
        public string SQLM11
        {
            get
            {
                return this.sqlM11.Text;
            }
            set
            {
                this.sqlM11.Text = value;
            }
        }

        /// <summary>
        /// 申请量M12
        /// </summary>
        public string SQLM12
        {
            get
            {
                return this.sqlM12.Text;
            }
            set
            {
                this.sqlM12.Text = value;
            }
        }

        #endregion

        #region 变量
         SYS_LOGBLL _SYS_LOGBLL = new SYS_LOGBLL();
         YS_LH_FENHUXXBLL BllFenHuXX = new YS_LH_FENHUXXBLL();
        #endregion

        #region 事件

        /// <summary>
        /// 页面加载事件
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitControl();
            }
        }

        #endregion

        #region 方法

        /// <summary>
        /// 设置原计划显示隐藏
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledYJH(bool enabled)
        {
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.yjhM1.ClientEnabled = enabled;
                    this.yjhM2.ClientEnabled = enabled;
                    this.yjhM3.ClientEnabled = enabled;
                    this.yjhM4.ClientEnabled = enabled;
                    this.yjhM5.ClientEnabled = enabled;
                    this.yjhM6.ClientEnabled = enabled;
                    this.yjhM7.ClientEnabled = enabled;
                    this.yjhM8.ClientEnabled = enabled;
                    this.yjhM9.ClientEnabled = enabled;
                    this.yjhM10.ClientEnabled = enabled;
                    this.yjhM11.ClientEnabled = enabled;
                    this.yjhM12.ClientEnabled = enabled;
                    this.yjhMSUM.ClientEnabled = enabled;
                    break;
                case eLaiHanLX.基建调整:
                    this.jjYJHM1.ClientEnabled = enabled;
                    this.jjYJHM2.ClientEnabled = enabled;
                    this.jjYJHM3.ClientEnabled = enabled;
                    this.jjYJHM4.ClientEnabled = enabled;
                    this.jjYJHM5.ClientEnabled = enabled;
                    this.jjYJHM6.ClientEnabled = enabled;
                    this.jjYJHM7.ClientEnabled = enabled;
                    this.jjYJHM8.ClientEnabled = enabled;
                    this.jjYJHM9.ClientEnabled = enabled;
                    this.jjYJHM10.ClientEnabled = enabled;
                    this.jjYJHM11.ClientEnabled = enabled;
                    this.jjYJHM12.ClientEnabled = enabled;
                    this.jjYJHMSUM.ClientEnabled = enabled;
                    break;
            }
        }

        /// <summary>
        /// 设置实用量显示隐藏
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledSYL(bool enabled)
        {
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.sylM1.ClientEnabled = enabled;
                    this.sylM2.ClientEnabled = enabled;
                    this.sylM3.ClientEnabled = enabled;
                    this.sylM4.ClientEnabled = enabled;
                    this.sylM5.ClientEnabled = enabled;
                    this.sylM6.ClientEnabled = enabled;
                    this.sylM7.ClientEnabled = enabled;
                    this.sylM8.ClientEnabled = enabled;
                    this.sylM9.ClientEnabled = enabled;
                    this.sylM10.ClientEnabled = enabled;
                    this.sylM11.ClientEnabled = enabled;
                    this.sylM12.ClientEnabled = enabled;
                    this.sylMSUM.ClientEnabled = enabled;
                    break;
                case eLaiHanLX.基建调整:
                    this.jjSYLM1.ClientEnabled = enabled;
                    this.jjSYLM2.ClientEnabled = enabled;
                    this.jjSYLM3.ClientEnabled = enabled;
                    this.jjSYLM4.ClientEnabled = enabled;
                    this.jjSYLM5.ClientEnabled = enabled;
                    this.jjSYLM6.ClientEnabled = enabled;
                    this.jjSYLM7.ClientEnabled = enabled;
                    this.jjSYLM8.ClientEnabled = enabled;
                    this.jjSYLM9.ClientEnabled = enabled;
                    this.jjSYLM10.ClientEnabled = enabled;
                    this.jjSYLM11.ClientEnabled = enabled;
                    this.jjSYLM12.ClientEnabled = enabled;
                    this.jjSYLMSUM.ClientEnabled = enabled;
                    break;
            }
        }

        /// <summary>
        /// 设置申请计划启用禁用
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledSQL(bool enabled)
        {
            //启用时根据水量年月和调整年月禁用不可调整的月份
            int m = -1;
            string tbPre = "";
            if (enabled && this.Y == (BusinessTool.GetWaterYM() / 100))
            {
                m = (BusinessTool.GetWaterYM() % 100);
            }
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.sqlM1.ClientEnabled = enabled;
                    this.sqlM2.ClientEnabled = enabled;
                    this.sqlM3.ClientEnabled = enabled;
                    this.sqlM4.ClientEnabled = enabled;
                    this.sqlM5.ClientEnabled = enabled;
                    this.sqlM6.ClientEnabled = enabled;
                    this.sqlM7.ClientEnabled = enabled;
                    this.sqlM8.ClientEnabled = enabled;
                    this.sqlM9.ClientEnabled = enabled;
                    this.sqlM10.ClientEnabled = enabled;
                    this.sqlM11.ClientEnabled = enabled;
                    this.sqlM12.ClientEnabled = enabled;
                    //this.sqlMSUM.ClientEnabled = false;
                    tbPre = "sqlM";
                    break;
                case eLaiHanLX.基建调整:
                    this.jjSQLBNM1.ClientEnabled = enabled;
                    this.jjSQLBNM2.ClientEnabled = enabled;
                    this.jjSQLBNM3.ClientEnabled = enabled;
                    this.jjSQLBNM4.ClientEnabled = enabled;
                    this.jjSQLBNM5.ClientEnabled = enabled;
                    this.jjSQLBNM6.ClientEnabled = enabled;
                    this.jjSQLBNM7.ClientEnabled = enabled;
                    this.jjSQLBNM8.ClientEnabled = enabled;
                    this.jjSQLBNM9.ClientEnabled = enabled;
                    this.jjSQLBNM10.ClientEnabled = enabled;
                    this.jjSQLBNM11.ClientEnabled = enabled;
                    this.jjSQLBNM12.ClientEnabled = enabled;
                    //this.jjSQLBNMSUM.ClientEnabled = enabled;
                    this.jjSQLXNM1.ClientEnabled = enabled;
                    this.jjSQLXNM2.ClientEnabled = enabled;
                    this.jjSQLXNM3.ClientEnabled = enabled;
                    this.jjSQLXNM4.ClientEnabled = enabled;
                    this.jjSQLXNM5.ClientEnabled = enabled;
                    this.jjSQLXNM6.ClientEnabled = enabled;
                    this.jjSQLXNM7.ClientEnabled = enabled;
                    this.jjSQLXNM8.ClientEnabled = enabled;
                    this.jjSQLXNM9.ClientEnabled = enabled;
                    this.jjSQLXNM10.ClientEnabled = enabled;
                    this.jjSQLXNM11.ClientEnabled = enabled;
                    this.jjSQLXNM12.ClientEnabled = enabled;
                    //this.jjSQLXNMSUM.ClientEnabled = enabled;
                    tbPre = "jjSQLBNM";
                    break;
            }
            //当启用时,如果为当前年,当前水量年月之前的仍然禁用
            if (enabled)
            {
                for (int i = 1; i <= m; i++)
                {
                    DevExpress.Web.ASPxTextBox tb = (DevExpress.Web.ASPxTextBox)this.FindControl(tbPre + i);
                    tb.ClientEnabled = false;
                    //PageTools.SetDisabled(tb, true);
                }
            }
        }

        /// <summary>
        /// 设置业务员建议计划显示隐藏
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledYWY(bool enabled)
        {
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.ywyM1.ClientEnabled = enabled;
                    this.ywyM2.ClientEnabled = enabled;
                    this.ywyM3.ClientEnabled = enabled;
                    this.ywyM4.ClientEnabled = enabled;
                    this.ywyM5.ClientEnabled = enabled;
                    this.ywyM6.ClientEnabled = enabled;
                    this.ywyM7.ClientEnabled = enabled;
                    this.ywyM8.ClientEnabled = enabled;
                    this.ywyM9.ClientEnabled = enabled;
                    this.ywyM10.ClientEnabled = enabled;
                    this.ywyM11.ClientEnabled = enabled;
                    this.ywyM12.ClientEnabled = enabled;
                    this.ywyMSUM.ClientEnabled = enabled;
                    break;
                case eLaiHanLX.基建调整:
                    this.jjYWYBNM1.ClientEnabled = enabled;
                    this.jjYWYBNM2.ClientEnabled = enabled;
                    this.jjYWYBNM3.ClientEnabled = enabled;
                    this.jjYWYBNM4.ClientEnabled = enabled;
                    this.jjYWYBNM5.ClientEnabled = enabled;
                    this.jjYWYBNM6.ClientEnabled = enabled;
                    this.jjYWYBNM7.ClientEnabled = enabled;
                    this.jjYWYBNM8.ClientEnabled = enabled;
                    this.jjYWYBNM9.ClientEnabled = enabled;
                    this.jjYWYBNM10.ClientEnabled = enabled;
                    this.jjYWYBNM11.ClientEnabled = enabled;
                    this.jjYWYBNM12.ClientEnabled = enabled;
                    this.jjYWYBNMSUM.ClientEnabled = enabled;
                    this.jjYWYXNM1.ClientEnabled = enabled;
                    this.jjYWYXNM2.ClientEnabled = enabled;
                    this.jjYWYXNM3.ClientEnabled = enabled;
                    this.jjYWYXNM4.ClientEnabled = enabled;
                    this.jjYWYXNM5.ClientEnabled = enabled;
                    this.jjYWYXNM6.ClientEnabled = enabled;
                    this.jjYWYXNM7.ClientEnabled = enabled;
                    this.jjYWYXNM8.ClientEnabled = enabled;
                    this.jjYWYXNM9.ClientEnabled = enabled;
                    this.jjYWYXNM10.ClientEnabled = enabled;
                    this.jjYWYXNM11.ClientEnabled = enabled;
                    this.jjYWYXNM12.ClientEnabled = enabled;
                    this.jjYWYXNMSUM.ClientEnabled = enabled;
                    break;
            }
        }

        /// <summary>
        /// 设置主任复核计划显示隐藏
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledZR(bool enabled)
        {
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.zrM1.ClientEnabled = enabled;
                    this.zrM2.ClientEnabled = enabled;
                    this.zrM3.ClientEnabled = enabled;
                    this.zrM4.ClientEnabled = enabled;
                    this.zrM5.ClientEnabled = enabled;
                    this.zrM6.ClientEnabled = enabled;
                    this.zrM7.ClientEnabled = enabled;
                    this.zrM8.ClientEnabled = enabled;
                    this.zrM9.ClientEnabled = enabled;
                    this.zrM10.ClientEnabled = enabled;
                    this.zrM11.ClientEnabled = enabled;
                    this.zrM12.ClientEnabled = enabled;
                    this.zrMSUM.ClientEnabled = enabled;
                    break;
                case eLaiHanLX.基建调整:
                    this.jjZRBNM1.ClientEnabled = enabled;
                    this.jjZRBNM2.ClientEnabled = enabled;
                    this.jjZRBNM3.ClientEnabled = enabled;
                    this.jjZRBNM4.ClientEnabled = enabled;
                    this.jjZRBNM5.ClientEnabled = enabled;
                    this.jjZRBNM6.ClientEnabled = enabled;
                    this.jjZRBNM7.ClientEnabled = enabled;
                    this.jjZRBNM8.ClientEnabled = enabled;
                    this.jjZRBNM9.ClientEnabled = enabled;
                    this.jjZRBNM10.ClientEnabled = enabled;
                    this.jjZRBNM11.ClientEnabled = enabled;
                    this.jjZRBNM12.ClientEnabled = enabled;
                    this.jjZRBNMSUM.ClientEnabled = enabled;
                    this.jjZRXNM1.ClientEnabled = enabled;
                    this.jjZRXNM2.ClientEnabled = enabled;
                    this.jjZRXNM3.ClientEnabled = enabled;
                    this.jjZRXNM4.ClientEnabled = enabled;
                    this.jjZRXNM5.ClientEnabled = enabled;
                    this.jjZRXNM6.ClientEnabled = enabled;
                    this.jjZRXNM7.ClientEnabled = enabled;
                    this.jjZRXNM8.ClientEnabled = enabled;
                    this.jjZRXNM9.ClientEnabled = enabled;
                    this.jjZRXNM10.ClientEnabled = enabled;
                    this.jjZRXNM11.ClientEnabled = enabled;
                    this.jjZRXNM12.ClientEnabled = enabled;
                    this.jjZRXNMSUM.ClientEnabled = enabled;
                    break;
            }
        }

        /// <summary>
        /// 设置节水科审核显示隐藏
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledJSK(bool enabled)
        {
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.jskM1.ClientEnabled = enabled;
                    this.jskM2.ClientEnabled = enabled;
                    this.jskM3.ClientEnabled = enabled;
                    this.jskM4.ClientEnabled = enabled;
                    this.jskM5.ClientEnabled = enabled;
                    this.jskM6.ClientEnabled = enabled;
                    this.jskM7.ClientEnabled = enabled;
                    this.jskM8.ClientEnabled = enabled;
                    this.jskM9.ClientEnabled = enabled;
                    this.jskM10.ClientEnabled = enabled;
                    this.jskM11.ClientEnabled = enabled;
                    this.jskM12.ClientEnabled = enabled;
                    this.jskMSUM.ClientEnabled = enabled;
                    break;
                case eLaiHanLX.基建调整:
                    this.jjJSKBNM1.ClientEnabled = enabled;
                    this.jjJSKBNM2.ClientEnabled = enabled;
                    this.jjJSKBNM3.ClientEnabled = enabled;
                    this.jjJSKBNM4.ClientEnabled = enabled;
                    this.jjJSKBNM5.ClientEnabled = enabled;
                    this.jjJSKBNM6.ClientEnabled = enabled;
                    this.jjJSKBNM7.ClientEnabled = enabled;
                    this.jjJSKBNM8.ClientEnabled = enabled;
                    this.jjJSKBNM9.ClientEnabled = enabled;
                    this.jjJSKBNM10.ClientEnabled = enabled;
                    this.jjJSKBNM11.ClientEnabled = enabled;
                    this.jjJSKBNM12.ClientEnabled = enabled;
                    this.jjJSKBNMSUM.ClientEnabled = enabled;
                    this.jjJSKXNM1.ClientEnabled = enabled;
                    this.jjJSKXNM2.ClientEnabled = enabled;
                    this.jjJSKXNM3.ClientEnabled = enabled;
                    this.jjJSKXNM4.ClientEnabled = enabled;
                    this.jjJSKXNM5.ClientEnabled = enabled;
                    this.jjJSKXNM6.ClientEnabled = enabled;
                    this.jjJSKXNM7.ClientEnabled = enabled;
                    this.jjJSKXNM8.ClientEnabled = enabled;
                    this.jjJSKXNM9.ClientEnabled = enabled;
                    this.jjJSKXNM10.ClientEnabled = enabled;
                    this.jjJSKXNM11.ClientEnabled = enabled;
                    this.jjJSKXNM12.ClientEnabled = enabled;
                    this.jjJSKXNMSUM.ClientEnabled = enabled;
                    break;
            }
        }

        /// <summary>
        /// 设置计财科复审计划显示隐藏
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledJCK(bool enabled)
        {
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.jckM1.ClientEnabled = enabled;
                    this.jckM2.ClientEnabled = enabled;
                    this.jckM3.ClientEnabled = enabled;
                    this.jckM4.ClientEnabled = enabled;
                    this.jckM5.ClientEnabled = enabled;
                    this.jckM6.ClientEnabled = enabled;
                    this.jckM7.ClientEnabled = enabled;
                    this.jckM8.ClientEnabled = enabled;
                    this.jckM9.ClientEnabled = enabled;
                    this.jckM10.ClientEnabled = enabled;
                    this.jckM11.ClientEnabled = enabled;
                    this.jckM12.ClientEnabled = enabled;
                    this.jckMSUM.ClientEnabled = enabled;
                    break;
                case eLaiHanLX.基建调整:
                    this.jjJCKBNM1.ClientEnabled = enabled;
                    this.jjJCKBNM2.ClientEnabled = enabled;
                    this.jjJCKBNM3.ClientEnabled = enabled;
                    this.jjJCKBNM4.ClientEnabled = enabled;
                    this.jjJCKBNM5.ClientEnabled = enabled;
                    this.jjJCKBNM6.ClientEnabled = enabled;
                    this.jjJCKBNM7.ClientEnabled = enabled;
                    this.jjJCKBNM8.ClientEnabled = enabled;
                    this.jjJCKBNM9.ClientEnabled = enabled;
                    this.jjJCKBNM10.ClientEnabled = enabled;
                    this.jjJCKBNM11.ClientEnabled = enabled;
                    this.jjJCKBNM12.ClientEnabled = enabled;
                    this.jjJCKBNMSUM.ClientEnabled = enabled;
                    this.jjJCKXNM1.ClientEnabled = enabled;
                    this.jjJCKXNM2.ClientEnabled = enabled;
                    this.jjJCKXNM3.ClientEnabled = enabled;
                    this.jjJCKXNM4.ClientEnabled = enabled;
                    this.jjJCKXNM5.ClientEnabled = enabled;
                    this.jjJCKXNM6.ClientEnabled = enabled;
                    this.jjJCKXNM7.ClientEnabled = enabled;
                    this.jjJCKXNM8.ClientEnabled = enabled;
                    this.jjJCKXNM9.ClientEnabled = enabled;
                    this.jjJCKXNM10.ClientEnabled = enabled;
                    this.jjJCKXNM11.ClientEnabled = enabled;
                    this.jjJCKXNM12.ClientEnabled = enabled;
                    this.jjJCKXNMSUM.ClientEnabled = enabled;
                    break;
            }
        }

        /// <summary>
        /// 设置处长审批计划显示隐藏
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledCZ(bool enabled)
        {
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.czM1.ClientEnabled = enabled;
                    this.czM2.ClientEnabled = enabled;
                    this.czM3.ClientEnabled = enabled;
                    this.czM4.ClientEnabled = enabled;
                    this.czM5.ClientEnabled = enabled;
                    this.czM6.ClientEnabled = enabled;
                    this.czM7.ClientEnabled = enabled;
                    this.czM8.ClientEnabled = enabled;
                    this.czM9.ClientEnabled = enabled;
                    this.czM10.ClientEnabled = enabled;
                    this.czM11.ClientEnabled = enabled;
                    this.czM12.ClientEnabled = enabled;
                    this.czMSUM.ClientEnabled = enabled;
                    break;
                case eLaiHanLX.基建调整:
                    this.jjCZBNM1.ClientEnabled = enabled;
                    this.jjCZBNM2.ClientEnabled = enabled;
                    this.jjCZBNM3.ClientEnabled = enabled;
                    this.jjCZBNM4.ClientEnabled = enabled;
                    this.jjCZBNM5.ClientEnabled = enabled;
                    this.jjCZBNM6.ClientEnabled = enabled;
                    this.jjCZBNM7.ClientEnabled = enabled;
                    this.jjCZBNM8.ClientEnabled = enabled;
                    this.jjCZBNM9.ClientEnabled = enabled;
                    this.jjCZBNM10.ClientEnabled = enabled;
                    this.jjCZBNM11.ClientEnabled = enabled;
                    this.jjCZBNM12.ClientEnabled = enabled;
                    this.jjCZBNMSUM.ClientEnabled = enabled;
                    this.jjCZXNM1.ClientEnabled = enabled;
                    this.jjCZXNM2.ClientEnabled = enabled;
                    this.jjCZXNM3.ClientEnabled = enabled;
                    this.jjCZXNM4.ClientEnabled = enabled;
                    this.jjCZXNM5.ClientEnabled = enabled;
                    this.jjCZXNM6.ClientEnabled = enabled;
                    this.jjCZXNM7.ClientEnabled = enabled;
                    this.jjCZXNM8.ClientEnabled = enabled;
                    this.jjCZXNM9.ClientEnabled = enabled;
                    this.jjCZXNM10.ClientEnabled = enabled;
                    this.jjCZXNM11.ClientEnabled = enabled;
                    this.jjCZXNM12.ClientEnabled = enabled;
                    this.jjCZXNMSUM.ClientEnabled = enabled;
                    break;
            }
        }

        /// <summary>
        /// 设置业务员建议计划显示隐藏
        /// </summary>
        /// <param name="enabled">值</param>
        private void SetEnabledFuHe(bool enabled)
        {
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.fhlM1.ClientEnabled = enabled;
                    this.fhlM2.ClientEnabled = enabled;
                    this.fhlM3.ClientEnabled = enabled;
                    this.fhlM4.ClientEnabled = enabled;
                    this.fhlM5.ClientEnabled = enabled;
                    this.fhlM6.ClientEnabled = enabled;
                    this.fhlM7.ClientEnabled = enabled;
                    this.fhlM8.ClientEnabled = enabled;
                    this.fhlM9.ClientEnabled = enabled;
                    this.fhlM10.ClientEnabled = enabled;
                    this.fhlM11.ClientEnabled = enabled;
                    this.fhlM12.ClientEnabled = enabled;
                    this.fhlMSUM.ClientEnabled = enabled;
                    break;
                case eLaiHanLX.基建调整:
                    this.jjFuHeBNM1.ClientEnabled = enabled;
                    this.jjFuHeBNM2.ClientEnabled = enabled;
                    this.jjFuHeBNM3.ClientEnabled = enabled;
                    this.jjFuHeBNM4.ClientEnabled = enabled;
                    this.jjFuHeBNM5.ClientEnabled = enabled;
                    this.jjFuHeBNM6.ClientEnabled = enabled;
                    this.jjFuHeBNM7.ClientEnabled = enabled;
                    this.jjFuHeBNM8.ClientEnabled = enabled;
                    this.jjFuHeBNM9.ClientEnabled = enabled;
                    this.jjFuHeBNM10.ClientEnabled = enabled;
                    this.jjFuHeBNM11.ClientEnabled = enabled;
                    this.jjFuHeBNM12.ClientEnabled = enabled;
                    this.jjFuHeBNMSUM.ClientEnabled = enabled;
                    this.jjFuHeXNM1.ClientEnabled = enabled;
                    this.jjFuHeXNM2.ClientEnabled = enabled;
                    this.jjFuHeXNM3.ClientEnabled = enabled;
                    this.jjFuHeXNM4.ClientEnabled = enabled;
                    this.jjFuHeXNM5.ClientEnabled = enabled;
                    this.jjFuHeXNM6.ClientEnabled = enabled;
                    this.jjFuHeXNM7.ClientEnabled = enabled;
                    this.jjFuHeXNM8.ClientEnabled = enabled;
                    this.jjFuHeXNM9.ClientEnabled = enabled;
                    this.jjFuHeXNM10.ClientEnabled = enabled;
                    this.jjFuHeXNM11.ClientEnabled = enabled;
                    this.jjFuHeXNM12.ClientEnabled = enabled;
                    this.jjFuHeXNMSUM.ClientEnabled = enabled;
                    break;
            }
        }

        /// <summary>
        /// 配置控件
        /// </summary>
        public void InitControl()
        {
            //默认禁用所有            
            //原计划
            this.SetEnabledYJH(false);
            //近一年实用
            this.SetEnabledSYL(false);
            //申请计划
            this.SetEnabledSQL(false);
            //业务员
            this.SetEnabledYWY(false);
            //主任
            this.SetEnabledZR(false);
            //节水科
            this.SetEnabledJSK(false);
            //计财科
            this.SetEnabledJCK(false);
            //处长
            this.SetEnabledCZ(false);
            //复核量
            this.SetEnabledFuHe(false);
            //控件显示与隐藏
            SetDisplay();
            if(this.LaiHanLX==eLaiHanLX.年度)
            {
                this.cbNDBLF.Checked = true;
            }

        }

        /// <summary>
        ///根据当前流程状态设置步骤显示
        /// </summary>
        private void SetDisplay()
        {
            //先隐藏所有
            this.tabTitle.Visible = false;
            this.pan1NianDu.Visible = false;
            this.pan3JiJian.Visible = false;
            //年度
            this.trYWY.Visible = false;
            this.trZR.Visible = false;
            this.trJSK.Visible = false;
            this.trJCK.Visible = false;
            this.trCZ.Visible = false;
            //基建
            this.trJJYWY1.Visible = false;
            this.trJJYWY2.Visible = false;
            this.trJJZR1.Visible = false;
            this.trJJZR2.Visible = false;
            this.trJJJSK1.Visible = false;
            this.trJJJSK2.Visible = false;
            this.trJJJCK1.Visible = false;
            this.trJJJCK2.Visible = false;
            this.trJJCZ1.Visible = false;
            this.trJJCZ2.Visible = false;
            //根据来函显示面板
            switch (this.LaiHanLX)
            {
                case eLaiHanLX.年度:
                    this.tabTitle.Visible = true;
                    this.pan1NianDu.Visible = true;
                    //根据来函类型及当前流程显示意意见量
                    switch (this.LaiHanLC)
                    {
                        case eLaiHanLCBH.主任:
                            this.trYWY.Visible = true;
                            break;
                        case eLaiHanLCBH.节水科:
                            this.trYWY.Visible = true;
                            if (this.Mode == eMode.Flow)
                            {
                                this.trFuHe.Visible = true;
                            }
                            else
                            {
                                this.trZR.Visible = true;
                            }
                            break;
                        case eLaiHanLCBH.计财科:
                            this.trYWY.Visible = true;
                            if (this.Mode == eMode.Flow)
                            {
                                this.trFuHe.Visible = true;
                            }
                            else
                            {
                                this.trZR.Visible = true;
                                this.trJSK.Visible = true;
                            }
                            break;
                        case eLaiHanLCBH.处长:
                            this.trYWY.Visible = true;
                            if (this.Mode == eMode.Flow)
                            {
                                this.trFuHe.Visible = true;
                            }
                            else
                            {
                                this.trZR.Visible = true;
                                this.trJSK.Visible = true;
                                this.trJCK.Visible = true;
                                this.trCZ.Visible = true;
                            }
                            break;
                        default:
                            this.trYWY.Visible = false;
                            this.trZR.Visible = false;
                            this.trJSK.Visible = false;
                            this.trJCK.Visible = false;
                            this.trCZ.Visible = false;
                            this.trFuHe.Visible = false;
                            break;
                    }
                    break;
                case eLaiHanLX.基建调整:
                    this.tabTitle.Visible = true;
                    this.pan3JiJian.Visible = true;
                    //根据来函类型及当前流程显示意意见量
                    switch (this.LaiHanLC)
                    {
                        case eLaiHanLCBH.主任:
                            this.trJJYWY1.Visible = true;
                            this.trJJYWY2.Visible = true;
                            break;
                        case eLaiHanLCBH.节水科:
                            this.trJJYWY1.Visible = true;
                            this.trJJYWY2.Visible = true;
                            if (this.Mode == eMode.Flow)
                            {
                                this.trJJFuHe1.Visible = true;
                                this.trJJFuHe2.Visible = true;
                            }
                            else
                            {
                                this.trJJZR1.Visible = true;
                                this.trJJZR2.Visible = true;
                            }
                            break;
                        case eLaiHanLCBH.计财科:
                            this.trJJYWY1.Visible = true;
                            this.trJJYWY2.Visible = true;
                            if (this.Mode == eMode.Flow)
                            {
                                this.trJJFuHe1.Visible = true;
                                this.trJJFuHe2.Visible = true;
                            }
                            else
                            {
                                this.trJJZR1.Visible = true;
                                this.trJJZR2.Visible = true;
                                this.trJJJSK1.Visible = true;
                                this.trJJJSK2.Visible = true;
                            }
                            break;
                        case eLaiHanLCBH.处长:
                            this.trJJYWY1.Visible = true;
                            this.trJJYWY2.Visible = true;
                            if (this.Mode == eMode.Flow)
                            {
                                this.trJJFuHe1.Visible = true;
                                this.trJJFuHe2.Visible = true;
                            }
                            else
                            {
                                this.trJJZR1.Visible = true;
                                this.trJJZR2.Visible = true;
                                this.trJJJSK1.Visible = true;
                                this.trJJJSK2.Visible = true;
                                this.trJJJCK1.Visible = true;
                                this.trJJJCK2.Visible = true;
                                this.trJJCZ1.Visible = true;
                                this.trJJCZ2.Visible = true;
                            }
                            break;
                        default:
                            this.trJJYWY1.Visible = false;
                            this.trJJYWY2.Visible = false;
                            this.trJJZR1.Visible = false;
                            this.trJJZR2.Visible = false;
                            this.trJJJSK1.Visible = false;
                            this.trJJJSK2.Visible = false;
                            this.trJJJCK1.Visible = false;
                            this.trJJJCK2.Visible = false;
                            this.trJJCZ1.Visible = false;
                            this.trJJCZ2.Visible = false;
                            this.trJJFuHe1.Visible = false;
                            this.trJJFuHe2.Visible = false;
                            break;
                    }
                    break;
                case eLaiHanLX.分户:
                    FenHuTable.Visible = true;
                    FenHuYJHTr.Visible = true;
                    if ((int)this.LaiHanLC > (int)eLaiHanLCBH.受理)
                    {
                        FenHuHJJH.Visible = false;
                        FenHuTrSY.Visible = true;
                        FenHuYJHTr.Visible = true;
                        trFHBLF.Visible = true;
                    }
                    break;
            }
            if (this.Mode == eMode.Detail)
            {
                //设置标签名称
                this.lblYWY.Text = "业务员建议：";
                this.lblZR.Text = "主任复核：";
                this.lblJSK.Text = "节水科审核：";
                this.lblJCK.Text = "计财科复审：";//20190410修改
                this.lblCZ.Text = "处长审批：";
            }
            else
            {
                //设置标签名称
                this.lblYWY.Text = "建议计划：";
                if (this.LaiHanLC == eLaiHanLCBH.预登记 || this.LaiHanLC == eLaiHanLCBH.登记)//仅此步骤可以输入,其他步骤各计划量均不可输入
                {
                    //启用申请计划
                    SetEnabledSQL(true);
                    //显示百立方米输入
                    trNDBLF.Visible = true;
                    trJJBLF.Visible = true;
                    trFHBLF.Visible = true;
                }
            }
        }

        /// <summary>
        /// 清空原计划
        /// </summary>
        private void ClearInfoContentYJH()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.yjhM1.Text = "";
                this.yjhM2.Text = "";
                this.yjhM3.Text = "";
                this.yjhM4.Text = "";
                this.yjhM5.Text = "";
                this.yjhM6.Text = "";
                this.yjhM7.Text = "";
                this.yjhM8.Text = "";
                this.yjhM9.Text = "";
                this.yjhM10.Text = ""; ;
                this.yjhM11.Text = ""; ;
                this.yjhM12.Text = "";
                this.yjhMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjYJHM1.Text = "";
                this.jjYJHM2.Text = "";
                this.jjYJHM3.Text = "";
                this.jjYJHM4.Text = "";
                this.jjYJHM5.Text = "";
                this.jjYJHM6.Text = "";
                this.jjYJHM7.Text = "";
                this.jjYJHM8.Text = "";
                this.jjYJHM9.Text = "";
                this.jjYJHM10.Text = ""; ;
                this.jjYJHM11.Text = ""; ;
                this.jjYJHM12.Text = "";
                this.jjYJHMSUM.Text = "";
            }
        }

        /// <summary>
        /// 清空实用量
        /// </summary>
        private void ClearInfoContentSYL()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.sylM1.Text = "";
                this.sylM2.Text = "";
                this.sylM3.Text = "";
                this.sylM4.Text = "";
                this.sylM5.Text = "";
                this.sylM6.Text = "";
                this.sylM7.Text = "";
                this.sylM8.Text = "";
                this.sylM9.Text = "";
                this.sylM10.Text = ""; ;
                this.sylM11.Text = ""; ;
                this.sylM12.Text = "";
                this.sylMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjSYLM1.Text = "";
                this.jjSYLM2.Text = "";
                this.jjSYLM3.Text = "";
                this.jjSYLM4.Text = "";
                this.jjSYLM5.Text = "";
                this.jjSYLM6.Text = "";
                this.jjSYLM7.Text = "";
                this.jjSYLM8.Text = "";
                this.jjSYLM9.Text = "";
                this.jjSYLM10.Text = ""; ;
                this.jjSYLM11.Text = ""; ;
                this.jjSYLM12.Text = "";
                this.jjSYLMSUM.Text = "";
            }
        }

        /// <summary>
        /// 清空申请量
        /// </summary>
        private void ClearInfoContentSQL()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.sqlM1.Text = "";
                this.sqlM2.Text = "";
                this.sqlM3.Text = "";
                this.sqlM4.Text = "";
                this.sqlM5.Text = "";
                this.sqlM6.Text = "";
                this.sqlM7.Text = "";
                this.sqlM8.Text = "";
                this.sqlM9.Text = "";
                this.sqlM10.Text = ""; ;
                this.sqlM11.Text = ""; ;
                this.sqlM12.Text = "";
                this.sqlMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjSQLBNM1.Text = "";
                this.jjSQLBNM2.Text = "";
                this.jjSQLBNM3.Text = "";
                this.jjSQLBNM4.Text = "";
                this.jjSQLBNM5.Text = "";
                this.jjSQLBNM6.Text = "";
                this.jjSQLBNM7.Text = "";
                this.jjSQLBNM8.Text = "";
                this.jjSQLBNM9.Text = "";
                this.jjSQLBNM10.Text = ""; ;
                this.jjSQLBNM11.Text = ""; ;
                this.jjSQLBNM12.Text = "";
                this.jjSQLBNMSUM.Text = "";
                this.jjSQLXNM1.Text = "";
                this.jjSQLXNM2.Text = "";
                this.jjSQLXNM3.Text = "";
                this.jjSQLXNM4.Text = "";
                this.jjSQLXNM5.Text = "";
                this.jjSQLXNM6.Text = "";
                this.jjSQLXNM7.Text = "";
                this.jjSQLXNM8.Text = "";
                this.jjSQLXNM9.Text = "";
                this.jjSQLXNM10.Text = ""; ;
                this.jjSQLXNM11.Text = ""; ;
                this.jjSQLXNM12.Text = "";
                this.jjSQLXNMSUM.Text = "";
            }
        }

        /// <summary>
        /// 清空业务员建议量
        /// </summary>
        private void ClearInfoContentYWY()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.ywyM1.Text = "";
                this.ywyM2.Text = "";
                this.ywyM3.Text = "";
                this.ywyM4.Text = "";
                this.ywyM5.Text = "";
                this.ywyM6.Text = "";
                this.ywyM7.Text = "";
                this.ywyM8.Text = "";
                this.ywyM9.Text = "";
                this.ywyM10.Text = ""; ;
                this.ywyM11.Text = ""; ;
                this.ywyM12.Text = "";
                this.ywyMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjYWYBNM1.Text = "";
                this.jjYWYBNM2.Text = "";
                this.jjYWYBNM3.Text = "";
                this.jjYWYBNM4.Text = "";
                this.jjYWYBNM5.Text = "";
                this.jjYWYBNM6.Text = "";
                this.jjYWYBNM7.Text = "";
                this.jjYWYBNM8.Text = "";
                this.jjYWYBNM9.Text = "";
                this.jjYWYBNM10.Text = ""; ;
                this.jjYWYBNM11.Text = ""; ;
                this.jjYWYBNM12.Text = "";
                this.jjYWYBNMSUM.Text = "";
                this.jjYWYXNM1.Text = "";
                this.jjYWYXNM2.Text = "";
                this.jjYWYXNM3.Text = "";
                this.jjYWYXNM4.Text = "";
                this.jjYWYXNM5.Text = "";
                this.jjYWYXNM6.Text = "";
                this.jjYWYXNM7.Text = "";
                this.jjYWYXNM8.Text = "";
                this.jjYWYXNM9.Text = "";
                this.jjYWYXNM10.Text = ""; ;
                this.jjYWYXNM11.Text = ""; ;
                this.jjYWYXNM12.Text = "";
                this.jjYWYXNMSUM.Text = "";
            }
        }

        /// <summary>
        /// 清空主任复核量
        /// </summary>
        private void ClearInfoContentZR()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.zrM1.Text = "";
                this.zrM2.Text = "";
                this.zrM3.Text = "";
                this.zrM4.Text = "";
                this.zrM5.Text = "";
                this.zrM6.Text = "";
                this.zrM7.Text = "";
                this.zrM8.Text = "";
                this.zrM9.Text = "";
                this.zrM10.Text = ""; ;
                this.zrM11.Text = ""; ;
                this.zrM12.Text = "";
                this.zrMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjZRBNM1.Text = "";
                this.jjZRBNM2.Text = "";
                this.jjZRBNM3.Text = "";
                this.jjZRBNM4.Text = "";
                this.jjZRBNM5.Text = "";
                this.jjZRBNM6.Text = "";
                this.jjZRBNM7.Text = "";
                this.jjZRBNM8.Text = "";
                this.jjZRBNM9.Text = "";
                this.jjZRBNM10.Text = ""; ;
                this.jjZRBNM11.Text = ""; ;
                this.jjZRBNM12.Text = "";
                this.jjZRBNMSUM.Text = "";
                this.jjZRXNM1.Text = "";
                this.jjZRXNM2.Text = "";
                this.jjZRXNM3.Text = "";
                this.jjZRXNM4.Text = "";
                this.jjZRXNM5.Text = "";
                this.jjZRXNM6.Text = "";
                this.jjZRXNM7.Text = "";
                this.jjZRXNM8.Text = "";
                this.jjZRXNM9.Text = "";
                this.jjZRXNM10.Text = ""; ;
                this.jjZRXNM11.Text = ""; ;
                this.jjZRXNM12.Text = "";
                this.jjZRXNMSUM.Text = "";
            }
        }

        /// <summary>
        /// 清空节水科审核量
        /// </summary>
        private void ClearInfoContentJSK()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.jskM1.Text = "";
                this.jskM2.Text = "";
                this.jskM3.Text = "";
                this.jskM4.Text = "";
                this.jskM5.Text = "";
                this.jskM6.Text = "";
                this.jskM7.Text = "";
                this.jskM8.Text = "";
                this.jskM9.Text = "";
                this.jskM10.Text = ""; ;
                this.jskM11.Text = ""; ;
                this.jskM12.Text = "";
                this.jskMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjJSKBNM1.Text = "";
                this.jjJSKBNM2.Text = "";
                this.jjJSKBNM3.Text = "";
                this.jjJSKBNM4.Text = "";
                this.jjJSKBNM5.Text = "";
                this.jjJSKBNM6.Text = "";
                this.jjJSKBNM7.Text = "";
                this.jjJSKBNM8.Text = "";
                this.jjJSKBNM9.Text = "";
                this.jjJSKBNM10.Text = ""; ;
                this.jjJSKBNM11.Text = ""; ;
                this.jjJSKBNM12.Text = "";
                this.jjJSKBNMSUM.Text = "";
                this.jjJSKXNM1.Text = "";
                this.jjJSKXNM2.Text = "";
                this.jjJSKXNM3.Text = "";
                this.jjJSKXNM4.Text = "";
                this.jjJSKXNM5.Text = "";
                this.jjJSKXNM6.Text = "";
                this.jjJSKXNM7.Text = "";
                this.jjJSKXNM8.Text = "";
                this.jjJSKXNM9.Text = "";
                this.jjJSKXNM10.Text = ""; ;
                this.jjJSKXNM11.Text = ""; ;
                this.jjJSKXNM12.Text = "";
                this.jjJSKXNMSUM.Text = "";
            }
        }

        /// <summary>
        /// 清空计财科复审量
        /// </summary>
        private void ClearInfoContentJCK()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.jckM1.Text = "";
                this.jckM2.Text = "";
                this.jckM3.Text = "";
                this.jckM4.Text = "";
                this.jckM5.Text = "";
                this.jckM6.Text = "";
                this.jckM7.Text = "";
                this.jckM8.Text = "";
                this.jckM9.Text = "";
                this.jckM10.Text = ""; ;
                this.jckM11.Text = ""; ;
                this.jckM12.Text = "";
                this.jckMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjJCKBNM1.Text = "";
                this.jjJCKBNM2.Text = "";
                this.jjJCKBNM3.Text = "";
                this.jjJCKBNM4.Text = "";
                this.jjJCKBNM5.Text = "";
                this.jjJCKBNM6.Text = "";
                this.jjJCKBNM7.Text = "";
                this.jjJCKBNM8.Text = "";
                this.jjJCKBNM9.Text = "";
                this.jjJCKBNM10.Text = ""; ;
                this.jjJCKBNM11.Text = ""; ;
                this.jjJCKBNM12.Text = "";
                this.jjJCKBNMSUM.Text = "";
                this.jjJCKXNM1.Text = "";
                this.jjJCKXNM2.Text = "";
                this.jjJCKXNM3.Text = "";
                this.jjJCKXNM4.Text = "";
                this.jjJCKXNM5.Text = "";
                this.jjJCKXNM6.Text = "";
                this.jjJCKXNM7.Text = "";
                this.jjJCKXNM8.Text = "";
                this.jjJCKXNM9.Text = "";
                this.jjJCKXNM10.Text = ""; ;
                this.jjJCKXNM11.Text = ""; ;
                this.jjJCKXNM12.Text = "";
                this.jjJCKXNMSUM.Text = "";
            }
        }

        /// <summary>
        /// 清空处长审批量
        /// </summary>
        private void ClearInfoContentCZ()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.czM1.Text = "";
                this.czM2.Text = "";
                this.czM3.Text = "";
                this.czM4.Text = "";
                this.czM5.Text = "";
                this.czM6.Text = "";
                this.czM7.Text = "";
                this.czM8.Text = "";
                this.czM9.Text = "";
                this.czM10.Text = ""; ;
                this.czM11.Text = ""; ;
                this.czM12.Text = "";
                this.czMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjCZBNM1.Text = "";
                this.jjCZBNM2.Text = "";
                this.jjCZBNM3.Text = "";
                this.jjCZBNM4.Text = "";
                this.jjCZBNM5.Text = "";
                this.jjCZBNM6.Text = "";
                this.jjCZBNM7.Text = "";
                this.jjCZBNM8.Text = "";
                this.jjCZBNM9.Text = "";
                this.jjCZBNM10.Text = ""; ;
                this.jjCZBNM11.Text = ""; ;
                this.jjCZBNM12.Text = "";
                this.jjCZBNMSUM.Text = "";
                this.jjCZXNM1.Text = "";
                this.jjCZXNM2.Text = "";
                this.jjCZXNM3.Text = "";
                this.jjCZXNM4.Text = "";
                this.jjCZXNM5.Text = "";
                this.jjCZXNM6.Text = "";
                this.jjCZXNM7.Text = "";
                this.jjCZXNM8.Text = "";
                this.jjCZXNM9.Text = "";
                this.jjCZXNM10.Text = ""; ;
                this.jjCZXNM11.Text = ""; ;
                this.jjCZXNM12.Text = "";
                this.jjCZXNMSUM.Text = "";
            }
        }

        /// <summary>
        /// 清空复核量
        /// </summary>
        private void ClearInfoContentFHL()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.fhlM1.Text = "";
                this.fhlM2.Text = "";
                this.fhlM3.Text = "";
                this.fhlM4.Text = "";
                this.fhlM5.Text = "";
                this.fhlM6.Text = "";
                this.fhlM7.Text = "";
                this.fhlM8.Text = "";
                this.fhlM9.Text = "";
                this.fhlM10.Text = ""; ;
                this.fhlM11.Text = ""; ;
                this.fhlM12.Text = "";
                this.fhlMSUM.Text = "";
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjFuHeBNM1.Text = "";
                this.jjFuHeBNM2.Text = "";
                this.jjFuHeBNM3.Text = "";
                this.jjFuHeBNM4.Text = "";
                this.jjFuHeBNM5.Text = "";
                this.jjFuHeBNM6.Text = "";
                this.jjFuHeBNM7.Text = "";
                this.jjFuHeBNM8.Text = "";
                this.jjFuHeBNM9.Text = "";
                this.jjFuHeBNM10.Text = ""; ;
                this.jjFuHeBNM11.Text = ""; ;
                this.jjFuHeBNM12.Text = "";
                this.jjFuHeBNMSUM.Text = "";
                this.jjFuHeXNM1.Text = "";
                this.jjFuHeXNM2.Text = "";
                this.jjFuHeXNM3.Text = "";
                this.jjFuHeXNM4.Text = "";
                this.jjFuHeXNM5.Text = "";
                this.jjFuHeXNM6.Text = "";
                this.jjFuHeXNM7.Text = "";
                this.jjFuHeXNM8.Text = "";
                this.jjFuHeXNM9.Text = "";
                this.jjFuHeXNM10.Text = ""; ;
                this.jjFuHeXNM11.Text = ""; ;
                this.jjFuHeXNM12.Text = "";
                this.jjFuHeXNMSUM.Text = "";
            }
        }
        
        /// <summary>
        /// 加载原计划
        /// </summary>
        private void LoadInfoContentYJH(DataRow dr)
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.yjhM1.Text = Convert.ToString(dr["I_M1"]) == "" ? "0" : Convert.ToString(dr["I_M1"]);
                this.yjhM2.Text = Convert.ToString(dr["I_M2"]) == "" ? "0" : Convert.ToString(dr["I_M2"]);
                this.yjhM3.Text = Convert.ToString(dr["I_M3"]) == "" ? "0" : Convert.ToString(dr["I_M3"]);
                this.yjhM4.Text = Convert.ToString(dr["I_M4"]) == "" ? "0" : Convert.ToString(dr["I_M4"]);
                this.yjhM5.Text = Convert.ToString(dr["I_M5"]) == "" ? "0" : Convert.ToString(dr["I_M5"]);
                this.yjhM6.Text = Convert.ToString(dr["I_M6"]) == "" ? "0" : Convert.ToString(dr["I_M6"]);
                this.yjhM7.Text = Convert.ToString(dr["I_M7"]) == "" ? "0" : Convert.ToString(dr["I_M7"]);
                this.yjhM8.Text = Convert.ToString(dr["I_M8"]) == "" ? "0" : Convert.ToString(dr["I_M8"]);
                this.yjhM9.Text = Convert.ToString(dr["I_M9"]) == "" ? "0" : Convert.ToString(dr["I_M9"]);
                this.yjhM10.Text = Convert.ToString(dr["I_M10"]) == "" ? "0" : Convert.ToString(dr["I_M10"]);
                this.yjhM11.Text = Convert.ToString(dr["I_M11"]) == "" ? "0" : Convert.ToString(dr["I_M11"]);
                this.yjhM12.Text = Convert.ToString(dr["I_M12"]) == "" ? "0" : Convert.ToString(dr["I_M12"]);
                this.yjhMSUM.Text = (int.Parse(this.yjhM1.Text)
                                    + int.Parse(this.yjhM2.Text)
                                    + int.Parse(this.yjhM3.Text)
                                    + int.Parse(this.yjhM4.Text)
                                    + int.Parse(this.yjhM5.Text)
                                    + int.Parse(this.yjhM6.Text)
                                    + int.Parse(this.yjhM7.Text)
                                    + int.Parse(this.yjhM8.Text)
                                    + int.Parse(this.yjhM9.Text)
                                    + int.Parse(this.yjhM10.Text)
                                    + int.Parse(this.yjhM11.Text)
                                    + int.Parse(this.yjhM12.Text)
                                    ).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjYJHM1.Text = Convert.ToString(dr["I_M1"]);
                this.jjYJHM2.Text = Convert.ToString(dr["I_M2"]);
                this.jjYJHM3.Text = Convert.ToString(dr["I_M3"]);
                this.jjYJHM4.Text = Convert.ToString(dr["I_M4"]);
                this.jjYJHM5.Text = Convert.ToString(dr["I_M5"]);
                this.jjYJHM6.Text = Convert.ToString(dr["I_M6"]);
                this.jjYJHM7.Text = Convert.ToString(dr["I_M7"]);
                this.jjYJHM8.Text = Convert.ToString(dr["I_M8"]);
                this.jjYJHM9.Text = Convert.ToString(dr["I_M9"]);
                this.jjYJHM10.Text = Convert.ToString(dr["I_M10"]);
                this.jjYJHM11.Text = Convert.ToString(dr["I_M11"]);
                this.jjYJHM12.Text = Convert.ToString(dr["I_M12"]);
                this.jjYJHMSUM.Text = (int.Parse(this.jjYJHM1.Text)
                                    + int.Parse(this.jjYJHM2.Text)
                                    + int.Parse(this.jjYJHM3.Text)
                                    + int.Parse(this.jjYJHM4.Text)
                                    + int.Parse(this.jjYJHM5.Text)
                                    + int.Parse(this.jjYJHM6.Text)
                                    + int.Parse(this.jjYJHM7.Text)
                                    + int.Parse(this.jjYJHM8.Text)
                                    + int.Parse(this.jjYJHM9.Text)
                                    + int.Parse(this.jjYJHM10.Text)
                                    + int.Parse(this.jjYJHM11.Text)
                                    + int.Parse(this.jjYJHM12.Text)
                                    ).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.分户)
            {

                this.txtFenHuYJH1.Text = Convert.ToString(dr["I_M1"]);
                this.txtFenHuYJH2.Text = Convert.ToString(dr["I_M2"]);
                this.txtFenHuYJH3.Text = Convert.ToString(dr["I_M3"]);
                this.txtFenHuYJH4.Text = Convert.ToString(dr["I_M4"]);
                this.txtFenHuYJH5.Text = Convert.ToString(dr["I_M5"]);
                this.txtFenHuYJH6.Text = Convert.ToString(dr["I_M6"]);
                this.txtFenHuYJH7.Text = Convert.ToString(dr["I_M7"]);
                this.txtFenHuYJH8.Text = Convert.ToString(dr["I_M8"]);
                this.txtFenHuYJH9.Text = Convert.ToString(dr["I_M9"]);
                this.txtFenHuYJH10.Text = Convert.ToString(dr["I_M10"]);
                this.txtFenHuYJH11.Text = Convert.ToString(dr["I_M11"]);
                this.txtFenHuYJH12.Text = Convert.ToString(dr["I_M12"]);
                this.txtFenHuYJH13.Text = (int.Parse(this.txtFenHuYJH1.Text)
                                    + int.Parse(this.txtFenHuYJH2.Text)
                                    + int.Parse(this.txtFenHuYJH3.Text)
                                    + int.Parse(this.txtFenHuYJH4.Text)
                                    + int.Parse(this.txtFenHuYJH5.Text)
                                    + int.Parse(this.txtFenHuYJH6.Text)
                                    + int.Parse(this.txtFenHuYJH7.Text)
                                    + int.Parse(this.txtFenHuYJH8.Text)
                                    + int.Parse(this.txtFenHuYJH9.Text)
                                    + int.Parse(this.txtFenHuYJH10.Text)
                                    + int.Parse(this.txtFenHuYJH11.Text)
                                    + int.Parse(this.txtFenHuYJH12.Text)
                                    ).ToString();
            }
        }

        /// <summary>
        /// 加载实用量
        /// </summary>
        private void LoadInfoContentSYL(DataRow dr)
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.sylM1.Text = Convert.ToString(dr["IM1"]);
                this.sylM2.Text = Convert.ToString(dr["IM2"]);
                this.sylM3.Text = Convert.ToString(dr["IM3"]);
                this.sylM4.Text = Convert.ToString(dr["IM4"]);
                this.sylM5.Text = Convert.ToString(dr["IM5"]);
                this.sylM6.Text = Convert.ToString(dr["IM6"]);
                this.sylM7.Text = Convert.ToString(dr["IM7"]);
                this.sylM8.Text = Convert.ToString(dr["IM8"]);
                this.sylM9.Text = Convert.ToString(dr["IM9"]);
                this.sylM10.Text = Convert.ToString(dr["IM10"]);
                this.sylM11.Text = Convert.ToString(dr["IM11"]);
                this.sylM12.Text = Convert.ToString(dr["IM12"]);
                this.sylMSUM.Text = (int.Parse(this.sylM1.Text)
                                   + int.Parse(this.sylM2.Text)
                                   + int.Parse(this.sylM3.Text)
                                   + int.Parse(this.sylM4.Text)
                                   + int.Parse(this.sylM5.Text)
                                   + int.Parse(this.sylM6.Text)
                                   + int.Parse(this.sylM7.Text)
                                   + int.Parse(this.sylM8.Text)
                                   + int.Parse(this.sylM9.Text)
                                   + int.Parse(this.sylM10.Text)
                                   + int.Parse(this.sylM11.Text)
                                   + int.Parse(this.sylM12.Text)
                                   ).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjSYLM1.Text = Convert.ToString(dr["IM1"]);
                this.jjSYLM2.Text = Convert.ToString(dr["IM2"]);
                this.jjSYLM3.Text = Convert.ToString(dr["IM3"]);
                this.jjSYLM4.Text = Convert.ToString(dr["IM4"]);
                this.jjSYLM5.Text = Convert.ToString(dr["IM5"]);
                this.jjSYLM6.Text = Convert.ToString(dr["IM6"]);
                this.jjSYLM7.Text = Convert.ToString(dr["IM7"]);
                this.jjSYLM8.Text = Convert.ToString(dr["IM8"]);
                this.jjSYLM9.Text = Convert.ToString(dr["IM9"]);
                this.jjSYLM10.Text = Convert.ToString(dr["IM10"]);
                this.jjSYLM11.Text = Convert.ToString(dr["IM11"]);
                this.jjSYLM12.Text = Convert.ToString(dr["IM12"]);
                this.jjSYLMSUM.Text = (int.Parse(this.jjSYLM1.Text)
                                    + int.Parse(this.jjSYLM2.Text)
                                    + int.Parse(this.jjSYLM3.Text)
                                    + int.Parse(this.jjSYLM4.Text)
                                    + int.Parse(this.jjSYLM5.Text)
                                    + int.Parse(this.jjSYLM6.Text)
                                    + int.Parse(this.jjSYLM7.Text)
                                    + int.Parse(this.jjSYLM8.Text)
                                    + int.Parse(this.jjSYLM9.Text)
                                    + int.Parse(this.jjSYLM10.Text)
                                    + int.Parse(this.jjSYLM11.Text)
                                    + int.Parse(this.jjSYLM12.Text)
                                    ).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.分户)
            {

                this.txtFenHuSY1.Text = Convert.ToString(dr["IM1"]);
                this.txtFenHuSY2.Text = Convert.ToString(dr["IM2"]);
                this.txtFenHuSY3.Text = Convert.ToString(dr["IM3"]);
                this.txtFenHuSY4.Text = Convert.ToString(dr["IM4"]);
                this.txtFenHuSY5.Text = Convert.ToString(dr["IM5"]);
                this.txtFenHuSY6.Text = Convert.ToString(dr["IM6"]);
                this.txtFenHuSY7.Text = Convert.ToString(dr["IM7"]);
                this.txtFenHuSY8.Text = Convert.ToString(dr["IM8"]);
                this.txtFenHuSY9.Text = Convert.ToString(dr["IM9"]);
                this.txtFenHuSY10.Text = Convert.ToString(dr["IM10"]);
                this.txtFenHuSY11.Text = Convert.ToString(dr["IM11"]);
                this.txtFenHuSY12.Text = Convert.ToString(dr["IM12"]);
                this.txtFenHuSY13.Text = (int.Parse(this.txtFenHuSY1.Text)
                                    + int.Parse(this.txtFenHuSY2.Text)
                                    + int.Parse(this.txtFenHuSY3.Text)
                                    + int.Parse(this.txtFenHuSY4.Text)
                                    + int.Parse(this.txtFenHuSY5.Text)
                                    + int.Parse(this.txtFenHuSY6.Text)
                                    + int.Parse(this.txtFenHuSY7.Text)
                                    + int.Parse(this.txtFenHuSY8.Text)
                                    + int.Parse(this.txtFenHuSY9.Text)
                                    + int.Parse(this.txtFenHuSY10.Text)
                                    + int.Parse(this.txtFenHuSY11.Text)
                                    + int.Parse(this.txtFenHuSY12.Text)
                                    ).ToString();
            }
        }

        /// <summary>
        /// 加载申请量
        /// </summary>
        private void LoadInfoContentSQL(DataRowCollection drc)
        {            
            //获取申请量所在的DataRowIndex
            List<int> indexs = LaiHanLCTools.GetNeedRowIndexs(drc,(int)this.LaiHanLX,eLaiHanLCBH.登记);
            if(indexs.Count==0)
            {
                indexs = LaiHanLCTools.GetNeedRowIndexs(drc, (int)this.LaiHanLX, eLaiHanLCBH.预登记);
            }
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.sqlM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.sqlM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.sqlM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.sqlM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.sqlM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.sqlM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.sqlM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.sqlM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.sqlM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.sqlM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.sqlM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.sqlM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.sqlMSUM.Text = (Convert.ToInt32(this.sqlM1.Text) + Convert.ToInt32(this.sqlM2.Text) + Convert.ToInt32(this.sqlM3.Text)
                                    + Convert.ToInt32(this.sqlM4.Text) + Convert.ToInt32(this.sqlM5.Text) + Convert.ToInt32(this.sqlM6.Text)
                                    + Convert.ToInt32(this.sqlM7.Text) + Convert.ToInt32(this.sqlM8.Text) + Convert.ToInt32(this.sqlM9.Text)
                                    + Convert.ToInt32(this.sqlM10.Text) + Convert.ToInt32(this.sqlM11.Text) + Convert.ToInt32(this.sqlM12.Text)).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //加载本年
                this.jjSQLBNM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jjSQLBNM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jjSQLBNM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jjSQLBNM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jjSQLBNM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jjSQLBNM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jjSQLBNM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jjSQLBNM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jjSQLBNM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jjSQLBNM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jjSQLBNM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jjSQLBNM12.Text = drc[indexs[0]]["I_M12"].ToString();
                string num1 = jjSQLBNM1.Text!=""? jjSQLBNM1.Text:"0";
                string num2 = jjSQLBNM2.Text != "" ? jjSQLBNM2.Text : "0";
                string num3 = jjSQLBNM3.Text != "" ? jjSQLBNM3.Text : "0";
                string num4 = jjSQLBNM4.Text != "" ? jjSQLBNM4.Text : "0";
                string num5 = jjSQLBNM5.Text != "" ? jjSQLBNM5.Text : "0";
                string num6 = jjSQLBNM6.Text != "" ? jjSQLBNM6.Text : "0";
                string num7 = jjSQLBNM7.Text != "" ? jjSQLBNM7.Text : "0";
                string num8 = jjSQLBNM8.Text != "" ? jjSQLBNM8.Text : "0";
                string num9 = jjSQLBNM9.Text != "" ? jjSQLBNM9.Text : "0";
                string num10 = jjSQLBNM10.Text != "" ? jjSQLBNM10.Text : "0";
                string num11 = jjSQLBNM11.Text != "" ? jjSQLBNM11.Text : "0";
                string num12 = jjSQLBNM12.Text != "" ? jjSQLBNM12.Text : "0";
                string AllNum = (Convert.ToInt32(num1) + Convert.ToInt32(num2) + Convert.ToInt32(num3)
                                    + Convert.ToInt32(num4) + Convert.ToInt32(num5) + Convert.ToInt32(num6)
                                    + Convert.ToInt32(num7) + Convert.ToInt32(num8) + Convert.ToInt32(num9)
                                    + Convert.ToInt32(num10) + Convert.ToInt32(num11) + Convert.ToInt32(num12)).ToString();
                this.jjSQLBNMSUM.Text = AllNum;
                //this.jjSQLBNMSUM.Text = (Convert.ToInt32(this.jjSQLBNM1.Text) + Convert.ToInt32(this.jjSQLBNM2.Text) + Convert.ToInt32(this.jjSQLBNM3.Text)
                //                    + Convert.ToInt32(this.jjSQLBNM4.Text) + Convert.ToInt32(this.jjSQLBNM5.Text) + Convert.ToInt32(this.jjSQLBNM6.Text)
                //                    + Convert.ToInt32(this.jjSQLBNM7.Text) + Convert.ToInt32(this.jjSQLBNM8.Text) + Convert.ToInt32(this.jjSQLBNM9.Text)
                //                    + Convert.ToInt32(this.jjSQLBNM10.Text) + Convert.ToInt32(this.jjSQLBNM11.Text) + Convert.ToInt32(this.jjSQLBNM12.Text)).ToString();
                //加载下年
                this.jjSQLXNM1.Text = drc[indexs[1]]["I_M1"].ToString();
                this.jjSQLXNM2.Text = drc[indexs[1]]["I_M2"].ToString();
                this.jjSQLXNM3.Text = drc[indexs[1]]["I_M3"].ToString();
                this.jjSQLXNM4.Text = drc[indexs[1]]["I_M4"].ToString();
                this.jjSQLXNM5.Text = drc[indexs[1]]["I_M5"].ToString();
                this.jjSQLXNM6.Text = drc[indexs[1]]["I_M6"].ToString();
                this.jjSQLXNM7.Text = drc[indexs[1]]["I_M7"].ToString();
                this.jjSQLXNM8.Text = drc[indexs[1]]["I_M8"].ToString();
                this.jjSQLXNM9.Text = drc[indexs[1]]["I_M9"].ToString();
                this.jjSQLXNM10.Text = drc[indexs[1]]["I_M10"].ToString();
                this.jjSQLXNM11.Text = drc[indexs[1]]["I_M11"].ToString();
                this.jjSQLXNM12.Text = drc[indexs[1]]["I_M12"].ToString();
                string enum1 = jjSQLXNM1.Text != "" ? jjSQLXNM1.Text : "0";
                string enum2 = jjSQLXNM2.Text != "" ? jjSQLXNM2.Text : "0";
                string enum3 = jjSQLXNM3.Text != "" ? jjSQLXNM3.Text : "0";
                string enum4 = jjSQLXNM4.Text != "" ? jjSQLXNM4.Text : "0";
                string enum5 = jjSQLXNM5.Text != "" ? jjSQLXNM5.Text : "0";
                string enum6 = jjSQLXNM6.Text != "" ? jjSQLXNM6.Text : "0";
                string enum7 = jjSQLXNM7.Text != "" ? jjSQLXNM7.Text : "0";
                string enum8 = jjSQLXNM8.Text != "" ? jjSQLXNM8.Text : "0";
                string enum9 = jjSQLXNM9.Text != "" ? jjSQLXNM9.Text : "0";
                string enum10 = jjSQLXNM10.Text != "" ? jjSQLXNM10.Text : "0";
                string enum11 = jjSQLXNM11.Text != "" ? jjSQLXNM11.Text : "0";
                string enum12 = jjSQLXNM12.Text != "" ? jjSQLXNM12.Text : "0";
                string eAllNum = (Convert.ToInt32(enum1) + Convert.ToInt32(enum2) + Convert.ToInt32(enum3)
                                    + Convert.ToInt32(enum4) + Convert.ToInt32(enum5) + Convert.ToInt32(enum6)
                                    + Convert.ToInt32(enum7) + Convert.ToInt32(enum8) + Convert.ToInt32(enum9)
                                    + Convert.ToInt32(enum10) + Convert.ToInt32(enum11) + Convert.ToInt32(enum12)).ToString();
                this.jjSQLXNMSUM.Text = eAllNum;
                //this.jjSQLXNMSUM.Text = (Convert.ToInt32(this.jjSQLXNM1.Text) + Convert.ToInt32(this.jjSQLXNM2.Text) + Convert.ToInt32(this.jjSQLXNM3.Text)
                //                    + Convert.ToInt32(this.jjSQLXNM4.Text) + Convert.ToInt32(this.jjSQLXNM5.Text) + Convert.ToInt32(this.jjSQLXNM6.Text)
                //                    + Convert.ToInt32(this.jjSQLXNM7.Text) + Convert.ToInt32(this.jjSQLXNM8.Text) + Convert.ToInt32(this.jjSQLXNM9.Text)
                //                    + Convert.ToInt32(this.jjSQLXNM10.Text) + Convert.ToInt32(this.jjSQLXNM11.Text) + Convert.ToInt32(this.jjSQLXNM12.Text)).ToString();
            }
        }

        /// <summary>
        /// 从原计划加载申请量
        /// </summary>
        private void LoadInfoContentSQLFromYJH()
        {
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.sqlM1.Text = this.yjhM1.Text;
                this.sqlM2.Text = this.yjhM2.Text;
                this.sqlM3.Text = this.yjhM3.Text;
                this.sqlM4.Text = this.yjhM4.Text;
                this.sqlM5.Text = this.yjhM5.Text;
                this.sqlM6.Text = this.yjhM6.Text;
                this.sqlM7.Text = this.yjhM7.Text;
                this.sqlM8.Text = this.yjhM8.Text;
                this.sqlM9.Text = this.yjhM9.Text;
                this.sqlM10.Text = this.yjhM10.Text;
                this.sqlM11.Text = this.yjhM11.Text;
                this.sqlM12.Text = this.yjhM12.Text;
                this.sqlMSUM.Text = this.yjhMSUM.Text;
            }
            if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                this.jjSQLBNM1.Text ="0";
                this.jjSQLBNM2.Text = "0";
                this.jjSQLBNM3.Text = "0";
                this.jjSQLBNM4.Text = "0";
                this.jjSQLBNM5.Text = "0";
                this.jjSQLBNM6.Text = "0";
                this.jjSQLBNM7.Text = "0";
                this.jjSQLBNM8.Text = "0";
                this.jjSQLBNM9.Text = "0";
                this.jjSQLBNM10.Text = "0";
                this.jjSQLBNM11.Text = "0";
                this.jjSQLBNM12.Text = "0";
                this.jjSQLBNMSUM.Text = "0";
                this.jjSQLXNM1.Text = "0";
                this.jjSQLXNM2.Text = "0";
                this.jjSQLXNM3.Text = "0";
                this.jjSQLXNM4.Text = "0";
                this.jjSQLXNM5.Text = "0";
                this.jjSQLXNM6.Text = "0";
                this.jjSQLXNM7.Text = "0";
                this.jjSQLXNM8.Text = "0";
                this.jjSQLXNM9.Text = "0";
                this.jjSQLXNM10.Text = "0";
                this.jjSQLXNM11.Text = "0";
                this.jjSQLXNM12.Text = "0";
                this.jjSQLXNMSUM.Text = "0";
                //this.jjSQLBNM1.Text = this.jjYJHM1.Text;
                //this.jjSQLBNM2.Text = this.jjYJHM2.Text;
                //this.jjSQLBNM3.Text = this.jjYJHM3.Text;
                //this.jjSQLBNM4.Text = this.jjYJHM4.Text;
                //this.jjSQLBNM5.Text = this.jjYJHM5.Text;
                //this.jjSQLBNM6.Text = this.jjYJHM6.Text;
                //this.jjSQLBNM7.Text = this.jjYJHM7.Text;
                //this.jjSQLBNM8.Text = this.jjYJHM8.Text;
                //this.jjSQLBNM9.Text = this.jjYJHM9.Text;
                //this.jjSQLBNM10.Text = this.jjYJHM10.Text;
                //this.jjSQLBNM11.Text = this.jjYJHM11.Text;
                //this.jjSQLBNM12.Text = this.jjYJHM12.Text;
                //this.jjSQLBNMSUM.Text = this.jjYJHMSUM.Text;
                //this.jjSQLXNM1.Text = this.jjYJHM1.Text;
                //this.jjSQLXNM2.Text = this.jjYJHM2.Text;
                //this.jjSQLXNM3.Text = this.jjYJHM3.Text;
                //this.jjSQLXNM4.Text = this.jjYJHM4.Text;
                //this.jjSQLXNM5.Text = this.jjYJHM5.Text;
                //this.jjSQLXNM6.Text = this.jjYJHM6.Text;
                //this.jjSQLXNM7.Text = this.jjYJHM7.Text;
                //this.jjSQLXNM8.Text = this.jjYJHM8.Text;
                //this.jjSQLXNM9.Text = this.jjYJHM9.Text;
                //this.jjSQLXNM10.Text = this.jjYJHM10.Text;
                //this.jjSQLXNM11.Text = this.jjYJHM11.Text;
                //this.jjSQLXNM12.Text = this.jjYJHM12.Text;
                //this.jjSQLXNMSUM.Text = this.jjYJHMSUM.Text;
            }
        }

        /// <summary>
        /// 加载业务员建议量
        /// </summary>
        private void LoadInfoContentYWY(DataRowCollection drc)
        {
            List<int> indexs = LaiHanLCTools.GetNeedRowIndexs(drc, (int)this.LaiHanLX, eLaiHanLCBH.业务员);
            if (indexs.Count == 0)
            {
                return;
            }
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.ywyM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.ywyM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.ywyM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.ywyM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.ywyM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.ywyM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.ywyM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.ywyM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.ywyM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.ywyM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.ywyM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.ywyM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.ywyMSUM.Text = (Convert.ToInt32(this.ywyM1.Text) + Convert.ToInt32(this.ywyM2.Text) + Convert.ToInt32(this.ywyM3.Text)
                                    + Convert.ToInt32(this.ywyM4.Text) + Convert.ToInt32(this.ywyM5.Text) + Convert.ToInt32(this.ywyM6.Text)
                                    + Convert.ToInt32(this.ywyM7.Text) + Convert.ToInt32(this.ywyM8.Text) + Convert.ToInt32(this.ywyM9.Text)
                                    + Convert.ToInt32(this.ywyM10.Text) + Convert.ToInt32(this.ywyM11.Text) + Convert.ToInt32(this.ywyM12.Text)).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //加载本年
                this.jjYWYBNM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jjYWYBNM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jjYWYBNM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jjYWYBNM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jjYWYBNM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jjYWYBNM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jjYWYBNM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jjYWYBNM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jjYWYBNM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jjYWYBNM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jjYWYBNM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jjYWYBNM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.jjYWYBNMSUM.Text = (Convert.ToInt32(this.jjYWYBNM1.Text) + Convert.ToInt32(this.jjYWYBNM2.Text) + Convert.ToInt32(this.jjYWYBNM3.Text)
                                    + Convert.ToInt32(this.jjYWYBNM4.Text) + Convert.ToInt32(this.jjYWYBNM5.Text) + Convert.ToInt32(this.jjYWYBNM6.Text)
                                    + Convert.ToInt32(this.jjYWYBNM7.Text) + Convert.ToInt32(this.jjYWYBNM8.Text) + Convert.ToInt32(this.jjYWYBNM9.Text)
                                    + Convert.ToInt32(this.jjYWYBNM10.Text) + Convert.ToInt32(this.jjYWYBNM11.Text) + Convert.ToInt32(this.jjYWYBNM12.Text)).ToString();
                //加载下年
                this.jjYWYXNM1.Text = drc[indexs[1]]["I_M1"].ToString();
                this.jjYWYXNM2.Text = drc[indexs[1]]["I_M2"].ToString();
                this.jjYWYXNM3.Text = drc[indexs[1]]["I_M3"].ToString();
                this.jjYWYXNM4.Text = drc[indexs[1]]["I_M4"].ToString();
                this.jjYWYXNM5.Text = drc[indexs[1]]["I_M5"].ToString();
                this.jjYWYXNM6.Text = drc[indexs[1]]["I_M6"].ToString();
                this.jjYWYXNM7.Text = drc[indexs[1]]["I_M7"].ToString();
                this.jjYWYXNM8.Text = drc[indexs[1]]["I_M8"].ToString();
                this.jjYWYXNM9.Text = drc[indexs[1]]["I_M9"].ToString();
                this.jjYWYXNM10.Text = drc[indexs[1]]["I_M10"].ToString();
                this.jjYWYXNM11.Text = drc[indexs[1]]["I_M11"].ToString();
                this.jjYWYXNM12.Text = drc[indexs[1]]["I_M12"].ToString();
                this.jjYWYXNMSUM.Text = (Convert.ToInt32(this.jjYWYXNM1.Text) + Convert.ToInt32(this.jjYWYXNM2.Text) + Convert.ToInt32(this.jjYWYXNM3.Text)
                                    + Convert.ToInt32(this.jjYWYXNM4.Text) + Convert.ToInt32(this.jjYWYXNM5.Text) + Convert.ToInt32(this.jjYWYXNM6.Text)
                                    + Convert.ToInt32(this.jjYWYXNM7.Text) + Convert.ToInt32(this.jjYWYXNM8.Text) + Convert.ToInt32(this.jjYWYXNM9.Text)
                                    + Convert.ToInt32(this.jjYWYXNM10.Text) + Convert.ToInt32(this.jjYWYXNM11.Text) + Convert.ToInt32(this.jjYWYXNM12.Text)).ToString();
            }
        }

        /// <summary>
        /// 加载主任复核
        /// </summary>
        private void LoadInfoContentZR(DataRowCollection drc)
        {
            List<int> indexs = LaiHanLCTools.GetNeedRowIndexs(drc, (int)this.LaiHanLX, eLaiHanLCBH.主任);
            if (indexs.Count == 0)
            {
                return;
            }
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.zrM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.zrM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.zrM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.zrM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.zrM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.zrM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.zrM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.zrM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.zrM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.zrM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.zrM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.zrM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.zrMSUM.Text = (Convert.ToInt32(this.zrM1.Text) + Convert.ToInt32(this.zrM2.Text) + Convert.ToInt32(this.zrM3.Text)
                                    + Convert.ToInt32(this.zrM4.Text) + Convert.ToInt32(this.zrM5.Text) + Convert.ToInt32(this.zrM6.Text)
                                    + Convert.ToInt32(this.zrM7.Text) + Convert.ToInt32(this.zrM8.Text) + Convert.ToInt32(this.zrM9.Text)
                                    + Convert.ToInt32(this.zrM10.Text) + Convert.ToInt32(this.zrM11.Text) + Convert.ToInt32(this.zrM12.Text)).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //加载本年
                this.jjZRBNM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jjZRBNM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jjZRBNM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jjZRBNM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jjZRBNM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jjZRBNM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jjZRBNM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jjZRBNM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jjZRBNM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jjZRBNM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jjZRBNM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jjZRBNM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.jjZRBNMSUM.Text = (Convert.ToInt32(this.jjZRBNM1.Text) + Convert.ToInt32(this.jjZRBNM2.Text) + Convert.ToInt32(this.jjZRBNM3.Text)
                                    + Convert.ToInt32(this.jjZRBNM4.Text) + Convert.ToInt32(this.jjZRBNM5.Text) + Convert.ToInt32(this.jjZRBNM6.Text)
                                    + Convert.ToInt32(this.jjZRBNM7.Text) + Convert.ToInt32(this.jjZRBNM8.Text) + Convert.ToInt32(this.jjZRBNM9.Text)
                                    + Convert.ToInt32(this.jjZRBNM10.Text) + Convert.ToInt32(this.jjZRBNM11.Text) + Convert.ToInt32(this.jjZRBNM12.Text)).ToString();
                //加载下年
                this.jjZRXNM1.Text = drc[indexs[1]]["I_M1"].ToString();
                this.jjZRXNM2.Text = drc[indexs[1]]["I_M2"].ToString();
                this.jjZRXNM3.Text = drc[indexs[1]]["I_M3"].ToString();
                this.jjZRXNM4.Text = drc[indexs[1]]["I_M4"].ToString();
                this.jjZRXNM5.Text = drc[indexs[1]]["I_M5"].ToString();
                this.jjZRXNM6.Text = drc[indexs[1]]["I_M6"].ToString();
                this.jjZRXNM7.Text = drc[indexs[1]]["I_M7"].ToString();
                this.jjZRXNM8.Text = drc[indexs[1]]["I_M8"].ToString();
                this.jjZRXNM9.Text = drc[indexs[1]]["I_M9"].ToString();
                this.jjZRXNM10.Text = drc[indexs[1]]["I_M10"].ToString();
                this.jjZRXNM11.Text = drc[indexs[1]]["I_M11"].ToString();
                this.jjZRXNM12.Text = drc[indexs[1]]["I_M12"].ToString();
                this.jjZRXNMSUM.Text = (Convert.ToInt32(this.jjZRXNM1.Text) + Convert.ToInt32(this.jjZRXNM2.Text) + Convert.ToInt32(this.jjZRXNM3.Text)
                                    + Convert.ToInt32(this.jjZRXNM4.Text) + Convert.ToInt32(this.jjZRXNM5.Text) + Convert.ToInt32(this.jjZRXNM6.Text)
                                    + Convert.ToInt32(this.jjZRXNM7.Text) + Convert.ToInt32(this.jjZRXNM8.Text) + Convert.ToInt32(this.jjZRXNM9.Text)
                                    + Convert.ToInt32(this.jjZRXNM10.Text) + Convert.ToInt32(this.jjZRXNM11.Text) + Convert.ToInt32(this.jjZRXNM12.Text)).ToString();
            }
        }

        /// <summary>
        /// 加载节水科审核
        /// </summary>
        private void LoadInfoContentJSK(DataRowCollection drc)
        {
            List<int> indexs = LaiHanLCTools.GetNeedRowIndexs(drc, (int)this.LaiHanLX, eLaiHanLCBH.节水科);
            if (indexs.Count == 0)
            {
                return;
            }
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.jskM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jskM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jskM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jskM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jskM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jskM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jskM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jskM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jskM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jskM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jskM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jskM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.jskMSUM.Text = (Convert.ToInt32(this.jskM1.Text) + Convert.ToInt32(this.jskM2.Text) + Convert.ToInt32(this.jskM3.Text)
                                    + Convert.ToInt32(this.jskM4.Text) + Convert.ToInt32(this.jskM5.Text) + Convert.ToInt32(this.jskM6.Text)
                                    + Convert.ToInt32(this.jskM7.Text) + Convert.ToInt32(this.jskM8.Text) + Convert.ToInt32(this.jskM9.Text)
                                    + Convert.ToInt32(this.jskM10.Text) + Convert.ToInt32(this.jskM11.Text) + Convert.ToInt32(this.jskM12.Text)).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //加载本年
                this.jjJSKBNM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jjJSKBNM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jjJSKBNM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jjJSKBNM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jjJSKBNM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jjJSKBNM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jjJSKBNM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jjJSKBNM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jjJSKBNM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jjJSKBNM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jjJSKBNM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jjJSKBNM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.jjJSKBNMSUM.Text = (Convert.ToInt32(this.jjJSKBNM1.Text) + Convert.ToInt32(this.jjJSKBNM2.Text) + Convert.ToInt32(this.jjJSKBNM3.Text)
                                    + Convert.ToInt32(this.jjJSKBNM4.Text) + Convert.ToInt32(this.jjJSKBNM5.Text) + Convert.ToInt32(this.jjJSKBNM6.Text)
                                    + Convert.ToInt32(this.jjJSKBNM7.Text) + Convert.ToInt32(this.jjJSKBNM8.Text) + Convert.ToInt32(this.jjJSKBNM9.Text)
                                    + Convert.ToInt32(this.jjJSKBNM10.Text) + Convert.ToInt32(this.jjJSKBNM11.Text) + Convert.ToInt32(this.jjJSKBNM12.Text)).ToString();
                //加载下年
                this.jjJSKXNM1.Text = drc[indexs[1]]["I_M1"].ToString();
                this.jjJSKXNM2.Text = drc[indexs[1]]["I_M2"].ToString();
                this.jjJSKXNM3.Text = drc[indexs[1]]["I_M3"].ToString();
                this.jjJSKXNM4.Text = drc[indexs[1]]["I_M4"].ToString();
                this.jjJSKXNM5.Text = drc[indexs[1]]["I_M5"].ToString();
                this.jjJSKXNM6.Text = drc[indexs[1]]["I_M6"].ToString();
                this.jjJSKXNM7.Text = drc[indexs[1]]["I_M7"].ToString();
                this.jjJSKXNM8.Text = drc[indexs[1]]["I_M8"].ToString();
                this.jjJSKXNM9.Text = drc[indexs[1]]["I_M9"].ToString();
                this.jjJSKXNM10.Text = drc[indexs[1]]["I_M10"].ToString();
                this.jjJSKXNM11.Text = drc[indexs[1]]["I_M11"].ToString();
                this.jjJSKXNM12.Text = drc[indexs[1]]["I_M12"].ToString();
                this.jjJSKXNMSUM.Text = (Convert.ToInt32(this.jjJSKXNM1.Text) + Convert.ToInt32(this.jjJSKXNM2.Text) + Convert.ToInt32(this.jjJSKXNM3.Text)
                                    + Convert.ToInt32(this.jjJSKXNM4.Text) + Convert.ToInt32(this.jjJSKXNM5.Text) + Convert.ToInt32(this.jjJSKXNM6.Text)
                                    + Convert.ToInt32(this.jjJSKXNM7.Text) + Convert.ToInt32(this.jjJSKXNM8.Text) + Convert.ToInt32(this.jjJSKXNM9.Text)
                                    + Convert.ToInt32(this.jjJSKXNM10.Text) + Convert.ToInt32(this.jjJSKXNM11.Text) + Convert.ToInt32(this.jjJSKXNM12.Text)).ToString();
            }
        }

        /// <summary>
        /// 加载计财科复审
        /// </summary>
        private void LoadInfoContentJCK(DataRowCollection drc)
        {
            List<int> indexs = LaiHanLCTools.GetNeedRowIndexs(drc, (int)this.LaiHanLX, eLaiHanLCBH.计财科);
            if (indexs.Count == 0)
            {
                return;
            }
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.jckM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jckM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jckM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jckM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jckM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jckM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jckM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jckM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jckM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jckM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jckM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jckM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.jckMSUM.Text = (Convert.ToInt32(this.jckM1.Text) + Convert.ToInt32(this.jckM2.Text) + Convert.ToInt32(this.jckM3.Text)
                                    + Convert.ToInt32(this.jckM4.Text) + Convert.ToInt32(this.jckM5.Text) + Convert.ToInt32(this.jckM6.Text)
                                    + Convert.ToInt32(this.jckM7.Text) + Convert.ToInt32(this.jckM8.Text) + Convert.ToInt32(this.jckM9.Text)
                                    + Convert.ToInt32(this.jckM10.Text) + Convert.ToInt32(this.jckM11.Text) + Convert.ToInt32(this.jckM12.Text)).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //加载本年
                this.jjJCKBNM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jjJCKBNM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jjJCKBNM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jjJCKBNM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jjJCKBNM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jjJCKBNM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jjJCKBNM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jjJCKBNM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jjJCKBNM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jjJCKBNM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jjJCKBNM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jjJCKBNM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.jjJCKBNMSUM.Text = (Convert.ToInt32(this.jjJCKBNM1.Text) + Convert.ToInt32(this.jjJCKBNM2.Text) + Convert.ToInt32(this.jjJCKBNM3.Text)
                                    + Convert.ToInt32(this.jjJCKBNM4.Text) + Convert.ToInt32(this.jjJCKBNM5.Text) + Convert.ToInt32(this.jjJCKBNM6.Text)
                                    + Convert.ToInt32(this.jjJCKBNM7.Text) + Convert.ToInt32(this.jjJCKBNM8.Text) + Convert.ToInt32(this.jjJCKBNM9.Text)
                                    + Convert.ToInt32(this.jjJCKBNM10.Text) + Convert.ToInt32(this.jjJCKBNM11.Text) + Convert.ToInt32(this.jjJCKBNM12.Text)).ToString();
                //加载下年
                this.jjJCKXNM1.Text = drc[indexs[1]]["I_M1"].ToString();
                this.jjJCKXNM2.Text = drc[indexs[1]]["I_M2"].ToString();
                this.jjJCKXNM3.Text = drc[indexs[1]]["I_M3"].ToString();
                this.jjJCKXNM4.Text = drc[indexs[1]]["I_M4"].ToString();
                this.jjJCKXNM5.Text = drc[indexs[1]]["I_M5"].ToString();
                this.jjJCKXNM6.Text = drc[indexs[1]]["I_M6"].ToString();
                this.jjJCKXNM7.Text = drc[indexs[1]]["I_M7"].ToString();
                this.jjJCKXNM8.Text = drc[indexs[1]]["I_M8"].ToString();
                this.jjJCKXNM9.Text = drc[indexs[1]]["I_M9"].ToString();
                this.jjJCKXNM10.Text = drc[indexs[1]]["I_M10"].ToString();
                this.jjJCKXNM11.Text = drc[indexs[1]]["I_M11"].ToString();
                this.jjJCKXNM12.Text = drc[indexs[1]]["I_M12"].ToString();
                this.jjJCKXNMSUM.Text = (Convert.ToInt32(this.jjJCKXNM1.Text) + Convert.ToInt32(this.jjJCKXNM2.Text) + Convert.ToInt32(this.jjJCKXNM3.Text)
                                    + Convert.ToInt32(this.jjJCKXNM4.Text) + Convert.ToInt32(this.jjJCKXNM5.Text) + Convert.ToInt32(this.jjJCKXNM6.Text)
                                    + Convert.ToInt32(this.jjJCKXNM7.Text) + Convert.ToInt32(this.jjJCKXNM8.Text) + Convert.ToInt32(this.jjJCKXNM9.Text)
                                    + Convert.ToInt32(this.jjJCKXNM10.Text) + Convert.ToInt32(this.jjJCKXNM11.Text) + Convert.ToInt32(this.jjJCKXNM12.Text)).ToString();
            }
        }

        /// <summary>
        /// 加载处长审批
        /// </summary>
        private void LoadInfoContentCZ(DataRowCollection drc)
        {
            List<int> indexs = LaiHanLCTools.GetNeedRowIndexs(drc, (int)this.LaiHanLX, eLaiHanLCBH.处长);
            if (indexs.Count == 0)
            {
                return;
            }
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.czM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.czM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.czM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.czM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.czM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.czM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.czM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.czM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.czM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.czM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.czM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.czM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.czMSUM.Text = (Convert.ToInt32(this.czM1.Text) + Convert.ToInt32(this.czM2.Text) + Convert.ToInt32(this.czM3.Text)
                                    + Convert.ToInt32(this.czM4.Text) + Convert.ToInt32(this.czM5.Text) + Convert.ToInt32(this.czM6.Text)
                                    + Convert.ToInt32(this.czM7.Text) + Convert.ToInt32(this.czM8.Text) + Convert.ToInt32(this.czM9.Text)
                                    + Convert.ToInt32(this.czM10.Text) + Convert.ToInt32(this.czM11.Text) + Convert.ToInt32(this.czM12.Text)).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //加载本年
                this.jjCZBNM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jjCZBNM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jjCZBNM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jjCZBNM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jjCZBNM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jjCZBNM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jjCZBNM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jjCZBNM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jjCZBNM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jjCZBNM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jjCZBNM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jjCZBNM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.jjCZBNMSUM.Text = (Convert.ToInt32(this.jjCZBNM1.Text) + Convert.ToInt32(this.jjCZBNM2.Text) + Convert.ToInt32(this.jjCZBNM3.Text)
                                    + Convert.ToInt32(this.jjCZBNM4.Text) + Convert.ToInt32(this.jjCZBNM5.Text) + Convert.ToInt32(this.jjCZBNM6.Text)
                                    + Convert.ToInt32(this.jjCZBNM7.Text) + Convert.ToInt32(this.jjCZBNM8.Text) + Convert.ToInt32(this.jjCZBNM9.Text)
                                    + Convert.ToInt32(this.jjCZBNM10.Text) + Convert.ToInt32(this.jjCZBNM11.Text) + Convert.ToInt32(this.jjCZBNM12.Text)).ToString();
                //加载下年
                this.jjCZXNM1.Text = drc[indexs[1]]["I_M1"].ToString();
                this.jjCZXNM2.Text = drc[indexs[1]]["I_M2"].ToString();
                this.jjCZXNM3.Text = drc[indexs[1]]["I_M3"].ToString();
                this.jjCZXNM4.Text = drc[indexs[1]]["I_M4"].ToString();
                this.jjCZXNM5.Text = drc[indexs[1]]["I_M5"].ToString();
                this.jjCZXNM6.Text = drc[indexs[1]]["I_M6"].ToString();
                this.jjCZXNM7.Text = drc[indexs[1]]["I_M7"].ToString();
                this.jjCZXNM8.Text = drc[indexs[1]]["I_M8"].ToString();
                this.jjCZXNM9.Text = drc[indexs[1]]["I_M9"].ToString();
                this.jjCZXNM10.Text = drc[indexs[1]]["I_M10"].ToString();
                this.jjCZXNM11.Text = drc[indexs[1]]["I_M11"].ToString();
                this.jjCZXNM12.Text = drc[indexs[1]]["I_M12"].ToString();
                this.jjCZXNMSUM.Text = (Convert.ToInt32(this.jjCZXNM1.Text) + Convert.ToInt32(this.jjCZXNM2.Text) + Convert.ToInt32(this.jjCZXNM3.Text)
                                    + Convert.ToInt32(this.jjCZXNM4.Text) + Convert.ToInt32(this.jjCZXNM5.Text) + Convert.ToInt32(this.jjCZXNM6.Text)
                                    + Convert.ToInt32(this.jjCZXNM7.Text) + Convert.ToInt32(this.jjCZXNM8.Text) + Convert.ToInt32(this.jjCZXNM9.Text)
                                    + Convert.ToInt32(this.jjCZXNM10.Text) + Convert.ToInt32(this.jjCZXNM11.Text) + Convert.ToInt32(this.jjCZXNM12.Text)).ToString();
            }
        }

        /// <summary>
        /// 加载复核量
        /// </summary>
        private void LoadInfoContentFHL(DataRowCollection drc,eLaiHanLCBH fhlLC)
        {            
            //获取复核量所在的DataRowIndex
            List<int> indexs = LaiHanLCTools.GetNeedRowIndexs(drc, (int)this.LaiHanLX, fhlLC);
            if (indexs.Count == 0)
            {
                this.fhlM1.Text = "";
                this.fhlM2.Text = "";
                this.fhlM3.Text = "";
                this.fhlM4.Text = "";
                this.fhlM5.Text = "";
                this.fhlM6.Text = "";
                this.fhlM7.Text = "";
                this.fhlM8.Text = "";
                this.fhlM9.Text = "";
                this.fhlM10.Text = ""; ;
                this.fhlM11.Text = ""; ;
                this.fhlM12.Text = "";
                this.fhlMSUM.Text = "";
                return;
            }
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                this.fhlM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.fhlM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.fhlM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.fhlM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.fhlM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.fhlM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.fhlM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.fhlM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.fhlM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.fhlM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.fhlM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.fhlM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.fhlMSUM.Text = (Convert.ToInt32(this.fhlM1.Text) + Convert.ToInt32(this.fhlM2.Text) + Convert.ToInt32(this.fhlM3.Text)
                                    + Convert.ToInt32(this.fhlM4.Text) + Convert.ToInt32(this.fhlM5.Text) + Convert.ToInt32(this.fhlM6.Text)
                                    + Convert.ToInt32(this.fhlM7.Text) + Convert.ToInt32(this.fhlM8.Text) + Convert.ToInt32(this.fhlM9.Text)
                                    + Convert.ToInt32(this.fhlM10.Text) + Convert.ToInt32(this.fhlM11.Text) + Convert.ToInt32(this.fhlM12.Text)).ToString();
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //加载本年
                this.jjFuHeBNM1.Text = drc[indexs[0]]["I_M1"].ToString();
                this.jjFuHeBNM2.Text = drc[indexs[0]]["I_M2"].ToString();
                this.jjFuHeBNM3.Text = drc[indexs[0]]["I_M3"].ToString();
                this.jjFuHeBNM4.Text = drc[indexs[0]]["I_M4"].ToString();
                this.jjFuHeBNM5.Text = drc[indexs[0]]["I_M5"].ToString();
                this.jjFuHeBNM6.Text = drc[indexs[0]]["I_M6"].ToString();
                this.jjFuHeBNM7.Text = drc[indexs[0]]["I_M7"].ToString();
                this.jjFuHeBNM8.Text = drc[indexs[0]]["I_M8"].ToString();
                this.jjFuHeBNM9.Text = drc[indexs[0]]["I_M9"].ToString();
                this.jjFuHeBNM10.Text = drc[indexs[0]]["I_M10"].ToString();
                this.jjFuHeBNM11.Text = drc[indexs[0]]["I_M11"].ToString();
                this.jjFuHeBNM12.Text = drc[indexs[0]]["I_M12"].ToString();
                this.jjFuHeBNMSUM.Text = (Convert.ToInt32(this.jjFuHeBNM1.Text) + Convert.ToInt32(this.jjFuHeBNM2.Text) + Convert.ToInt32(this.jjFuHeBNM3.Text)
                                    + Convert.ToInt32(this.jjFuHeBNM4.Text) + Convert.ToInt32(this.jjFuHeBNM5.Text) + Convert.ToInt32(this.jjFuHeBNM6.Text)
                                    + Convert.ToInt32(this.jjFuHeBNM7.Text) + Convert.ToInt32(this.jjFuHeBNM8.Text) + Convert.ToInt32(this.jjFuHeBNM9.Text)
                                    + Convert.ToInt32(this.jjFuHeBNM10.Text) + Convert.ToInt32(this.jjFuHeBNM11.Text) + Convert.ToInt32(this.jjFuHeBNM12.Text)).ToString();
                //加载下年
                this.jjFuHeXNM1.Text = drc[indexs[1]]["I_M1"].ToString();
                this.jjFuHeXNM2.Text = drc[indexs[1]]["I_M2"].ToString();
                this.jjFuHeXNM3.Text = drc[indexs[1]]["I_M3"].ToString();
                this.jjFuHeXNM4.Text = drc[indexs[1]]["I_M4"].ToString();
                this.jjFuHeXNM5.Text = drc[indexs[1]]["I_M5"].ToString();
                this.jjFuHeXNM6.Text = drc[indexs[1]]["I_M6"].ToString();
                this.jjFuHeXNM7.Text = drc[indexs[1]]["I_M7"].ToString();
                this.jjFuHeXNM8.Text = drc[indexs[1]]["I_M8"].ToString();
                this.jjFuHeXNM9.Text = drc[indexs[1]]["I_M9"].ToString();
                this.jjFuHeXNM10.Text = drc[indexs[1]]["I_M10"].ToString();
                this.jjFuHeXNM11.Text = drc[indexs[1]]["I_M11"].ToString();
                this.jjFuHeXNM12.Text = drc[indexs[1]]["I_M12"].ToString();
                this.jjFuHeXNMSUM.Text = (Convert.ToInt32(this.jjFuHeXNM1.Text) + Convert.ToInt32(this.jjFuHeXNM2.Text) + Convert.ToInt32(this.jjFuHeXNM3.Text)
                                    + Convert.ToInt32(this.jjFuHeXNM4.Text) + Convert.ToInt32(this.jjFuHeXNM5.Text) + Convert.ToInt32(this.jjFuHeXNM6.Text)
                                    + Convert.ToInt32(this.jjFuHeXNM7.Text) + Convert.ToInt32(this.jjFuHeXNM8.Text) + Convert.ToInt32(this.jjFuHeXNM9.Text)
                                    + Convert.ToInt32(this.jjFuHeXNM10.Text) + Convert.ToInt32(this.jjFuHeXNM11.Text) + Convert.ToInt32(this.jjSQLXNM12.Text)).ToString();
            }
        }

        /// <summary>
        /// 提交验证
        /// </summary>
        ValidateRS IUCLHOperate.Validate()
        {
            ValidateRS rs = new ValidateRS();
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                if (this.sqlM1.Text == "" || this.sqlM2.Text == "" || this.sqlM3.Text == "" || this.sqlM4.Text == "" || this.sqlM5.Text == ""
                    || this.sqlM6.Text == "" || this.sqlM7.Text == "" || this.sqlM8.Text == "" || this.sqlM9.Text == "" || this.sqlM10.Text == ""
                    || this.sqlM11.Text == "" || this.sqlM12.Text == "")
                {
                    rs.Msg = "请将申请量输入完整。";
                    return rs;
                }
                //判断是否与原计划一致
                if (this.sqlM1.Text == this.yjhM1.Text && this.sqlM2.Text == this.yjhM2.Text && this.sqlM3.Text == this.yjhM3.Text && this.sqlM4.Text == this.yjhM4.Text && this.sqlM5.Text == this.yjhM5.Text
                    && this.sqlM6.Text == this.yjhM6.Text && this.sqlM7.Text == this.yjhM7.Text && this.sqlM8.Text == this.yjhM8.Text && this.sqlM9.Text == this.yjhM9.Text && this.sqlM10.Text == this.yjhM10.Text
                    && this.sqlM11.Text == this.yjhM11.Text && this.sqlM12.Text == this.yjhM12.Text)
                {
                    rs.Msg = "当前申请量与原计划一致,请修改。";
                    return rs;
                }
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //if (this.jjSQLBNM1.Text == "" || this.jjSQLBNM2.Text == "" || this.jjSQLBNM3.Text == "" || this.jjSQLBNM4.Text == "" || this.jjSQLBNM5.Text == ""
                //    || this.jjSQLBNM6.Text == "" || this.jjSQLBNM7.Text == "" || this.jjSQLBNM8.Text == "" || this.jjSQLBNM9.Text == "" || this.jjSQLBNM10.Text == ""
                //    || this.jjSQLBNM11.Text == "" || this.jjSQLBNM12.Text == "")
                //{
                //    rs.Msg = "请将申请量输入完整。";
                //    return rs;
                //}
                //if (this.jjSQLXNM1.Text == "" || this.jjSQLXNM2.Text == "" || this.jjSQLXNM3.Text == "" || this.jjSQLXNM4.Text == "" || this.jjSQLXNM5.Text == ""
                //    || this.jjSQLXNM6.Text == "" || this.jjSQLXNM7.Text == "" || this.jjSQLXNM8.Text == "" || this.jjSQLXNM9.Text == "" || this.jjSQLXNM10.Text == ""
                //    || this.jjSQLXNM11.Text == "" || this.jjSQLXNM12.Text == "")
                //{
                //    rs.Msg = "请将申请量输入完整。";
                //    return rs;
                //}
                if (
                    (this.jjSQLBNM1.Text == "" || this.jjSQLBNM1.Text == "0")
                    &&
                    (this.jjSQLBNM2.Text == "" || this.jjSQLBNM2.Text == "0")
                    &&
                    (this.jjSQLBNM3.Text == "" || this.jjSQLBNM3.Text == "0")
                    &&
                    (this.jjSQLBNM4.Text == "" || this.jjSQLBNM4.Text == "0")
                    &&
                    (this.jjSQLBNM5.Text == "" || this.jjSQLBNM5.Text == "0")
                    &&
                    (this.jjSQLBNM6.Text == "" || this.jjSQLBNM6.Text == "0")
                    &&
                    (this.jjSQLBNM7.Text == "" || this.jjSQLBNM7.Text == "0")
                    &&
                    (this.jjSQLBNM8.Text == "" || this.jjSQLBNM8.Text == "0")
                    &&
                    (this.jjSQLBNM9.Text == "" || this.jjSQLBNM9.Text == "0")
                    &&
                    (this.jjSQLBNM10.Text == "" || this.jjSQLBNM10.Text == "0")
                    &&
                    (this.jjSQLBNM11.Text == "" || this.jjSQLBNM11.Text == "0")
                    &&
                    (this.jjSQLBNM12.Text == "" || this.jjSQLBNM12.Text == "0")
                    &&
                    (this.jjSQLXNM1.Text == "" || this.jjSQLXNM1.Text == "0")
                    &&
                    (this.jjSQLXNM2.Text == "" || this.jjSQLXNM2.Text == "0")
                    &&
                    (this.jjSQLXNM3.Text == "" || this.jjSQLXNM3.Text == "0")
                    &&
                    (this.jjSQLXNM4.Text == "" || this.jjSQLXNM4.Text == "0")
                    &&
                    (this.jjSQLXNM5.Text == "" || this.jjSQLXNM5.Text == "0")
                    &&
                    (this.jjSQLXNM6.Text == "" || this.jjSQLXNM6.Text == "0")
                    &&
                    (this.jjSQLXNM7.Text == "" || this.jjSQLXNM7.Text == "0")
                    &&
                    (this.jjSQLXNM8.Text == "" || this.jjSQLXNM8.Text == "0")
                    &&
                    (this.jjSQLXNM9.Text == "" || this.jjSQLXNM9.Text == "0")
                    &&
                    (this.jjSQLXNM10.Text == "" || this.jjSQLXNM10.Text == "0")
                    &&
                    (this.jjSQLXNM11.Text == "" || this.jjSQLXNM11.Text == "0")
                    &&
                    (this.jjSQLXNM12.Text == "" || this.jjSQLXNM12.Text == "0")
                    )
                {
                    rs.Msg = "请输入正确的申请量。";
                    return rs;
                }
            }
            else if (this.LaiHanLX == eLaiHanLX.分户)
            {
                bool IsYes = false;
                rs.Msg = CheckFenHuJHXX(out IsYes);
                rs.IsSuccess = IsYes;
                return rs;
            }
            rs.IsSuccess = true;
            return rs;
        }

        /// <summary>
        /// 清空数据
        /// </summary>
        public void ClearInfo()
        {
            //原计划
            this.ClearInfoContentYJH();
            //近一年实用
            this.ClearInfoContentSYL();
            //申请量
            this.ClearInfoContentSQL();
            //建议量
            this.ClearInfoContentYWY();
            //复核量
            this.ClearInfoContentFHL();
            ///清空分户计划
            ClearFenHuValue();
        }

        /// <summary>
        /// 根据来函加载信息
        /// </summary>
        /// <param name="laihanxx"></param>
        public void LoadInfo(YS_LH_LAIHANXX laihanxx)
        {
            if (laihanxx.ID == 0)
            {
                this.LaiHanLC = eLaiHanLCBH.未登记;
                SetDisplay();
                if (laihanxx.I_TZY == null)
                {
                    return;
                }
            }
            else
            {
                this.LaiHanLC = (eLaiHanLCBH)Enum.Parse(typeof(eLaiHanLCBH), laihanxx.I_LIUCHENGBH.ToString());
                SetDisplay();
            }
            if (laihanxx.I_TZY != null)
            {
                this.Y = (int)laihanxx.I_TZY;
            }
            else if (laihanxx.I_Y != null)
            {
                this.Y = (int)laihanxx.I_Y;
            }
            //DataRowCollection drc = new SpHelper().P_YS_LH_YONGHUYSSJCX((int)laihanxx.I_Y, null, laihanxx.S_YONGHUBH, 1).Tables[0].Rows;
            //先清除原计划及实用量
            this.ClearInfoContentYJH();
            this.ClearInfoContentSYL();
            //DataSet ds = new SpHelper().P_YS_LH_YONGHUYSSJCX((int?)laihanxx.I_TZY, (int?)laihanxx.I_TZM, laihanxx.S_YONGHUBH, out yjh, out syl);

            DataRowCollection drc = null;
            var waterYM = BusinessTool.GetWaterYM();
            if ((eLaiHanLX)laihanxx.I_LAIHANLX == eLaiHanLX.年度 && laihanxx.I_TZY > waterYM / 100)
                //drc = new YS_JH_XIADAJHBLL().SelectYS_JH_XIADAJHsDynamic(string.Format(@" I_JLZT=0 AND S_YONGHUH='{0}'
                //    and I_Y in (select max(I_Y) from ys_jh_xiadajh where I_JLZT=0 AND S_YONGHUH='{0}' and I_Y <= {1})", laihanxx.S_YONGHUBH, laihanxx.I_TZY), null).Rows;
                drc = new YS_JH_XIADAJHBLL().SelectYS_JH_XIADAJHsDynamic(string.Format(@" I_JLZT=0 AND S_YONGHUH='{0}'
                    and I_Y in (select max(I_Y) from ys_jh_xiadajh where I_JLZT=0 AND S_YONGHUH='{0}' and I_Y <= {1})", laihanxx.S_YONGHUBH, laihanxx.I_Y), null).Rows;
            if (drc == null || drc.Count == 0)
                drc = new YS_JH_YUANJIHUAProcess().SelectYS_JH_YUANJIHUAsDynamic("I_Y=" + (laihanxx.I_TZY==null? laihanxx.I_Y: laihanxx.I_TZY) + " AND S_YONGHUH='" + laihanxx.S_YONGHUBH + "' AND I_JLZT=0", null).Rows;

            if (drc.Count > 0)
            {
                LoadInfoContentYJH(drc[0]);
            }
            int? syl, yjh;
            int? tzy = (int)(laihanxx.I_TZY==null? laihanxx.I_Y: laihanxx.I_TZY) - 1;//20190327 bug修改
            if (this.LaiHanLX == eLaiHanLX.分户)
                tzy = (int)laihanxx.I_TZY;
            DataSet ds = new SpHelper().P_YS_LH_YONGHUYSSJCX(tzy, (int?)laihanxx.I_TZM, laihanxx.S_YONGHUBH, out yjh, out syl);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                LoadInfoContentSYL(ds.Tables[0].Rows[0]);
            }
            /*
            for (int i = 0; i < drc.Count; i++)
            {
                //原计划
                if (drc[i]["I_Y"] == Convert.DBNull)
                {
                    LoadInfoContentYJH(drc[i]);
                }
                else //近一年实用
                {
                    LoadInfoContentSYL(drc[i]);
                }
            }
            */
            if (laihanxx.I_LIUCHENGBH <= (int)eLaiHanLCBH.预登记||laihanxx.I_LIUCHENGBH==null)
            {
                    //启用申请计划
                this.SetEnabledSQL(true);
            }
            else
            {
                this.SetEnabledSQL(false);
            }
            //如果是加载信息,根据来涵号加载申请量,建议量及复核量
            if (laihanxx.S_LAIHANBH != null)
            {                
                //加载申请量
                //drc = new SpHelper().P_YS_LHGETSHENPIYJS((int)laihanxx.I_LAIHANLX, laihanxx.S_LAIHANBH, (int)laihanxx.I_LIUCHENGBH, null, 1).Tables[0].Rows;
                drc = new SpHelper().P_YS_LHGETSHENPIYJS((int)laihanxx.I_LAIHANLX, laihanxx.S_LAIHANBH).Tables[0].Rows;
                LoadInfoContentSQL(drc);
                //当前为流程操作时,最近的一次显示为复核量
                if (this.Mode == eMode.Flow)
                {
                    //节水科之后加载复核量
                    if ((int)laihanxx.I_LIUCHENGBH >= (int)eLaiHanLCBH.节水科)
                    {
                        //获取上一流程作为复核量
                        eLaiHanLCBH preFlow = LaiHanLCTools.GetPreFlow((int)laihanxx.I_LAIHANLX,(int)laihanxx.I_LIUCHENGBH);
                        //加载
                        LoadInfoContentFHL(drc,preFlow);
                    }
                    //主任之后加载业务员建议量
                    if ((int)laihanxx.I_LIUCHENGBH >= (int)eLaiHanLCBH.主任)
                    {
                        LoadInfoContentYWY(drc);
                    }
                    if ((int)laihanxx.I_LAIHANLX >= (int)eLaiHanLX.分户)
                    {
                        
                        if ((int)laihanxx.I_LIUCHENGBH >= (int)eLaiHanLCBH.业务员)
                        {
                            SetJiHuaXXLC(drc);
                            ASPxButton3.Visible = false;
                        }
                    }
                }
                else   //审批详情,依次显示
                {
                    LoadInfoContentYWY(drc);
                    LoadInfoContentZR(drc);
                    LoadInfoContentJSK(drc);
                    LoadInfoContentJCK(drc);
                    LoadInfoContentCZ(drc);
                }
            }
            else //添加,申请量默认从原计划加载
            {
                this.LoadInfoContentSQLFromYJH();
            }
        }

        /// <summary>
        /// 获取申请量
        /// </summary>
        /// <param name="getBenNian">当前来函为基建时才生效,并且该参数为true时,获取申请量_本年,否则申请量_下年.</param>
        /// <returns></returns>
        public List<decimal> GetSQLS(bool getBenNian)
        {
            List<decimal> sqls = new List<decimal>();
            if (this.LaiHanLX == eLaiHanLX.年度)
            {
                sqls.Add(decimal.Parse(this.sqlM1.Text));
                sqls.Add(decimal.Parse(this.sqlM2.Text));
                sqls.Add(decimal.Parse(this.sqlM3.Text));
                sqls.Add(decimal.Parse(this.sqlM4.Text));
                sqls.Add(decimal.Parse(this.sqlM5.Text));
                sqls.Add(decimal.Parse(this.sqlM6.Text));
                sqls.Add(decimal.Parse(this.sqlM7.Text));
                sqls.Add(decimal.Parse(this.sqlM8.Text));
                sqls.Add(decimal.Parse(this.sqlM9.Text));
                sqls.Add(decimal.Parse(this.sqlM10.Text));
                sqls.Add(decimal.Parse(this.sqlM11.Text));
                sqls.Add(decimal.Parse(this.sqlM12.Text));
            }
            else if (this.LaiHanLX == eLaiHanLX.基建调整)
            {
                //sqls.Add(getBenNian ? (this.jjSQLBNM1.Text!=this.jjYJHM1.Text?decimal.Parse(this.jjSQLBNM1.Text):0) : (this.jjSQLXNM1.Text!=this.jjYJHM1.Text?decimal.Parse(this.jjSQLXNM1.Text):0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM2.Text != this.jjYJHM2.Text ? decimal.Parse(this.jjSQLBNM2.Text) : 0) : (this.jjSQLXNM2.Text != this.jjYJHM2.Text ? decimal.Parse(this.jjSQLXNM2.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM3.Text != this.jjYJHM3.Text ? decimal.Parse(this.jjSQLBNM3.Text) : 0) : (this.jjSQLXNM3.Text != this.jjYJHM3.Text ? decimal.Parse(this.jjSQLXNM3.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM4.Text != this.jjYJHM4.Text ? decimal.Parse(this.jjSQLBNM4.Text) : 0) : (this.jjSQLXNM4.Text != this.jjYJHM4.Text ? decimal.Parse(this.jjSQLXNM4.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM5.Text != this.jjYJHM5.Text ? decimal.Parse(this.jjSQLBNM5.Text) : 0) : (this.jjSQLXNM5.Text != this.jjYJHM5.Text ? decimal.Parse(this.jjSQLXNM5.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM6.Text != this.jjYJHM6.Text ? decimal.Parse(this.jjSQLBNM6.Text) : 0) : (this.jjSQLXNM6.Text != this.jjYJHM6.Text ? decimal.Parse(this.jjSQLXNM6.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM7.Text != this.jjYJHM7.Text ? decimal.Parse(this.jjSQLBNM7.Text) : 0) : (this.jjSQLXNM7.Text != this.jjYJHM7.Text ? decimal.Parse(this.jjSQLXNM7.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM8.Text != this.jjYJHM8.Text ? decimal.Parse(this.jjSQLBNM8.Text) : 0) : (this.jjSQLXNM8.Text != this.jjYJHM8.Text ? decimal.Parse(this.jjSQLXNM8.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM9.Text != this.jjYJHM9.Text ? decimal.Parse(this.jjSQLBNM9.Text) : 0) : (this.jjSQLXNM9.Text != this.jjYJHM9.Text ? decimal.Parse(this.jjSQLXNM9.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM10.Text != this.jjYJHM10.Text ? decimal.Parse(this.jjSQLBNM10.Text) : 0) : (this.jjSQLXNM10.Text != this.jjYJHM10.Text ? decimal.Parse(this.jjSQLXNM10.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM11.Text != this.jjYJHM11.Text ? decimal.Parse(this.jjSQLBNM11.Text) : 0) : (this.jjSQLXNM11.Text != this.jjYJHM11.Text ? decimal.Parse(this.jjSQLXNM11.Text) : 0));
                //sqls.Add(getBenNian ? (this.jjSQLBNM12.Text != this.jjYJHM12.Text ? decimal.Parse(this.jjSQLBNM12.Text) : 0) : (this.jjSQLXNM12.Text != this.jjYJHM12.Text ? decimal.Parse(this.jjSQLXNM12.Text) : 0));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM1.Text) : decimal.Parse(this.jjSQLXNM1.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM2.Text) : decimal.Parse(this.jjSQLXNM2.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM3.Text) : decimal.Parse(this.jjSQLXNM3.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM4.Text) : decimal.Parse(this.jjSQLXNM4.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM5.Text) : decimal.Parse(this.jjSQLXNM5.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM6.Text) : decimal.Parse(this.jjSQLXNM6.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM7.Text) : decimal.Parse(this.jjSQLXNM7.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM8.Text) : decimal.Parse(this.jjSQLXNM8.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM9.Text) : decimal.Parse(this.jjSQLXNM9.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM10.Text) : decimal.Parse(this.jjSQLXNM10.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM11.Text) : decimal.Parse(this.jjSQLXNM11.Text));
                sqls.Add(getBenNian ? decimal.Parse(this.jjSQLBNM12.Text) : decimal.Parse(this.jjSQLXNM12.Text));
            }
            return sqls;
        }

        /// <summary>
        /// 根据用户信息查询计划信息
        /// </summary>
        /// <param name="YongHuH"></param>
        public void SetJiHuaXX(string YongHuH,int type)
        {
            YS_JH_YUANJIHUABLL BllYuanJiHua = new YS_JH_YUANJIHUABLL();
            int waterYM = BusinessTool.GetWaterYM();
            int y = Convert.ToInt32(waterYM.ToString().Substring(0,4));
            string where = " S_YONGHUH='{0}' and I_Y={1} and i_jlzt=0 ";
            where = string.Format(where,YongHuH,y);
            DataTable dt = BllYuanJiHua.SelectYS_JH_YUANJIHUAsDynamic(where,"",null);
            if (dt != null && dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                if (type == 0 || type == 1)
                {
                    
                    txtFenHu1JH1.Text = dr["I_M1"].ToString();
                    txtFenHu1JH2.Text = dr["I_M2"].ToString();
                    txtFenHu1JH3.Text = dr["I_M3"].ToString();

                    txtFenHu1JH4.Text = dr["I_M4"].ToString();
                    txtFenHu1JH5.Text = dr["I_M5"].ToString();
                    txtFenHu1JH6.Text = dr["I_M6"].ToString();

                    txtFenHu1JH7.Text = dr["I_M7"].ToString();
                    txtFenHu1JH8.Text = dr["I_M8"].ToString();
                    txtFenHu1JH9.Text = dr["I_M9"].ToString();

                    txtFenHu1JH10.Text = dr["I_M10"].ToString();
                    txtFenHu1JH11.Text = dr["I_M11"].ToString();
                    txtFenHu1JH12.Text = dr["I_M12"].ToString();

                    txtFenHu1JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();

                    //txtFenHuYJH1.Text = dr["I_M1"].ToString();
                    //txtFenHuYJH2.Text = dr["I_M2"].ToString();
                    //txtFenHuYJH3.Text = dr["I_M3"].ToString();

                    //txtFenHuYJH4.Text = dr["I_M4"].ToString();
                    //txtFenHuYJH5.Text = dr["I_M5"].ToString();
                    //txtFenHuYJH6.Text = dr["I_M6"].ToString();

                    //txtFenHuYJH7.Text = dr["I_M7"].ToString();
                    //txtFenHuYJH8.Text = dr["I_M8"].ToString();
                    //txtFenHuYJH9.Text = dr["I_M9"].ToString();

                    //txtFenHuYJH10.Text = dr["I_M10"].ToString();
                    //txtFenHuYJH11.Text = dr["I_M11"].ToString();
                    //txtFenHuYJH12.Text = dr["I_M12"].ToString();

                    //txtFenHuYJH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                    //                    + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                    //                    + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                    //                    + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();
                }
                else if (type == 2)
                {
                    txtFenHu2JH1.Text = dr["I_M1"].ToString();
                    txtFenHu2JH2.Text = dr["I_M2"].ToString();
                    txtFenHu2JH3.Text = dr["I_M3"].ToString();

                    txtFenHu2JH4.Text = dr["I_M4"].ToString();
                    txtFenHu2JH5.Text = dr["I_M5"].ToString();
                    txtFenHu2JH6.Text = dr["I_M6"].ToString();

                    txtFenHu2JH7.Text = dr["I_M7"].ToString();
                    txtFenHu2JH8.Text = dr["I_M8"].ToString();
                    txtFenHu2JH9.Text = dr["I_M9"].ToString();

                    txtFenHu2JH10.Text = dr["I_M10"].ToString();
                    txtFenHu2JH11.Text = dr["I_M11"].ToString();
                    txtFenHu2JH12.Text = dr["I_M12"].ToString();

                    txtFenHu2JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();
               
                }
                else if (type == 4)
                {
                    txtFenHu3JH1.Text = dr["I_M1"].ToString();
                    txtFenHu3JH2.Text = dr["I_M2"].ToString();
                    txtFenHu3JH3.Text = dr["I_M3"].ToString();

                    txtFenHu3JH4.Text = dr["I_M4"].ToString();
                    txtFenHu3JH5.Text = dr["I_M5"].ToString();
                    txtFenHu3JH6.Text = dr["I_M6"].ToString();

                    txtFenHu3JH7.Text = dr["I_M7"].ToString();
                    txtFenHu3JH8.Text = dr["I_M8"].ToString();
                    txtFenHu3JH9.Text = dr["I_M9"].ToString();

                    txtFenHu3JH10.Text = dr["I_M10"].ToString();
                    txtFenHu3JH11.Text = dr["I_M11"].ToString();
                    txtFenHu3JH12.Text = dr["I_M12"].ToString();

                    txtFenHu3JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();

                }
            }
            SetSumJiHuaXX();
        }

        public void SetJiHuaXXBind(string father,string YongHuH, int type)
        {
            YS_LH_FENHUXXBLL FenHuBll = new YS_LH_FENHUXXBLL();
            int waterYM = BusinessTool.GetWaterYM();
            int y = Convert.ToInt32(waterYM.ToString().Substring(0, 4));
            string where = " S_YONGHUH='{0}' and I_Y={1} and i_jlzt=0 and S_YONGHUHFATHER='{2}' ";
            where = string.Format(where, YongHuH, y,father);
            DataTable dt = FenHuBll.SelectYS_LH_FENHUXXesDynamic(where, "", null);
            if (dt != null && dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                if (type == 0 || type == 1)
                {
                    lblFenHu1.Text = "[" + dr["S_YONGHUH"].ToString() + "-" + dr["S_YONGHUM"].ToString() + "]";

                    txtFenHu1JH1.Text = dr["I_M1"].ToString();
                    txtFenHu1JH2.Text = dr["I_M2"].ToString();
                    txtFenHu1JH3.Text = dr["I_M3"].ToString();

                    txtFenHu1JH4.Text = dr["I_M4"].ToString();
                    txtFenHu1JH5.Text = dr["I_M5"].ToString();
                    txtFenHu1JH6.Text = dr["I_M6"].ToString();

                    txtFenHu1JH7.Text = dr["I_M7"].ToString();
                    txtFenHu1JH8.Text = dr["I_M8"].ToString();
                    txtFenHu1JH9.Text = dr["I_M9"].ToString();

                    txtFenHu1JH10.Text = dr["I_M10"].ToString();
                    txtFenHu1JH11.Text = dr["I_M11"].ToString();
                    txtFenHu1JH12.Text = dr["I_M12"].ToString();

                    txtFenHu1JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();
                    //txtFenHuYJH1.Text = dr["I_M1"].ToString();
                    //txtFenHuYJH2.Text = dr["I_M2"].ToString();
                    //txtFenHuYJH3.Text = dr["I_M3"].ToString();

                    //txtFenHuYJH4.Text = dr["I_M4"].ToString();
                    //txtFenHuYJH5.Text = dr["I_M5"].ToString();
                    //txtFenHuYJH6.Text = dr["I_M6"].ToString();

                    //txtFenHuYJH7.Text = dr["I_M7"].ToString();
                    //txtFenHuYJH8.Text = dr["I_M8"].ToString();
                    //txtFenHuYJH9.Text = dr["I_M9"].ToString();

                    //txtFenHuYJH10.Text = dr["I_M10"].ToString();
                    //txtFenHuYJH11.Text = dr["I_M11"].ToString();
                    //txtFenHuYJH12.Text = dr["I_M12"].ToString();

                    //txtFenHuYJH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                    //                    + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                    //                    + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                    //                    + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();
                }
                else if (type == 2)
                {
                    lblFenHu2.Text = "[" + dr["S_YONGHUH"].ToString() + "-" + dr["S_YONGHUM"].ToString() + "]";

                    txtFenHu2JH1.Text = dr["I_M1"].ToString();
                    txtFenHu2JH2.Text = dr["I_M2"].ToString();
                    txtFenHu2JH3.Text = dr["I_M3"].ToString();

                    txtFenHu2JH4.Text = dr["I_M4"].ToString();
                    txtFenHu2JH5.Text = dr["I_M5"].ToString();
                    txtFenHu2JH6.Text = dr["I_M6"].ToString();

                    txtFenHu2JH7.Text = dr["I_M7"].ToString();
                    txtFenHu2JH8.Text = dr["I_M8"].ToString();
                    txtFenHu2JH9.Text = dr["I_M9"].ToString();

                    txtFenHu2JH10.Text = dr["I_M10"].ToString();
                    txtFenHu2JH11.Text = dr["I_M11"].ToString();
                    txtFenHu2JH12.Text = dr["I_M12"].ToString();

                    txtFenHu2JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();

                }
                else if (type == 3)
                {
                    lblFenHu3.Text = "[" + dr["S_YONGHUH"].ToString() + "-" + dr["S_YONGHUM"].ToString() + "]";

                    txtFenHu3JH1.Text = dr["I_M1"].ToString();
                    txtFenHu3JH2.Text = dr["I_M2"].ToString();
                    txtFenHu3JH3.Text = dr["I_M3"].ToString();

                    txtFenHu3JH4.Text = dr["I_M4"].ToString();
                    txtFenHu3JH5.Text = dr["I_M5"].ToString();
                    txtFenHu3JH6.Text = dr["I_M6"].ToString();

                    txtFenHu3JH7.Text = dr["I_M7"].ToString();
                    txtFenHu3JH8.Text = dr["I_M8"].ToString();
                    txtFenHu3JH9.Text = dr["I_M9"].ToString();

                    txtFenHu3JH10.Text = dr["I_M10"].ToString();
                    txtFenHu3JH11.Text = dr["I_M11"].ToString();
                    txtFenHu3JH12.Text = dr["I_M12"].ToString();

                    txtFenHu3JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();

                }
            }
            SetSumJiHuaXX();
        }
        public void SetJiHuaXXLC(DataRowCollection dt)
        {            
           
            if (dt != null && dt.Count > 0)
            {
                
                //if (dt.Count <= 2)
                if (dt.Count >= 2)
                {
                    DataRow dr = dt[0];
                    lblFenHu1.Text = "[" + dr["S_YONGHUH"].ToString() + "-" + dr["S_YONGHUM"].ToString() + "]";

                    txtFenHu1JH1.Text = dr["I_M1"].ToString();
                    txtFenHu1JH2.Text = dr["I_M2"].ToString();
                    txtFenHu1JH3.Text = dr["I_M3"].ToString();

                    txtFenHu1JH4.Text = dr["I_M4"].ToString();
                    txtFenHu1JH5.Text = dr["I_M5"].ToString();
                    txtFenHu1JH6.Text = dr["I_M6"].ToString();

                    txtFenHu1JH7.Text = dr["I_M7"].ToString();
                    txtFenHu1JH8.Text = dr["I_M8"].ToString();
                    txtFenHu1JH9.Text = dr["I_M9"].ToString();

                    txtFenHu1JH10.Text = dr["I_M10"].ToString();
                    txtFenHu1JH11.Text = dr["I_M11"].ToString();
                    txtFenHu1JH12.Text = dr["I_M12"].ToString();

                    txtFenHu1JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();

                    DataRow dr2 = dt[1];
                    lblFenHu2.Text = "[" + dr2["S_YONGHUH"].ToString() + "-" + dr2["S_YONGHUM"].ToString() + "]";

                    txtFenHu2JH1.Text = dr2["I_M1"].ToString();
                    txtFenHu2JH2.Text = dr2["I_M2"].ToString();
                    txtFenHu2JH3.Text = dr2["I_M3"].ToString();

                    txtFenHu2JH4.Text = dr2["I_M4"].ToString();
                    txtFenHu2JH5.Text = dr2["I_M5"].ToString();
                    txtFenHu2JH6.Text = dr2["I_M6"].ToString();

                    txtFenHu2JH7.Text = dr2["I_M7"].ToString();
                    txtFenHu2JH8.Text = dr2["I_M8"].ToString();
                    txtFenHu2JH9.Text = dr2["I_M9"].ToString();

                    txtFenHu2JH10.Text = dr2["I_M10"].ToString();
                    txtFenHu2JH11.Text = dr2["I_M11"].ToString();
                    txtFenHu2JH12.Text = dr2["I_M12"].ToString();

                    txtFenHu2JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();

                }
                if (dt.Count>2)
                {
                    DataRow dr = dt[2];
                    lblFenHu3.Text = "[" + dr["S_YONGHUH"].ToString() + "-" + dr["S_YONGHUM"].ToString() + "]";

                    txtFenHu3JH1.Text = dr["I_M1"].ToString();
                    txtFenHu3JH2.Text = dr["I_M2"].ToString();
                    txtFenHu3JH3.Text = dr["I_M3"].ToString();

                    txtFenHu3JH4.Text = dr["I_M4"].ToString();
                    txtFenHu3JH5.Text = dr["I_M5"].ToString();
                    txtFenHu3JH6.Text = dr["I_M6"].ToString();

                    txtFenHu3JH7.Text = dr["I_M7"].ToString();
                    txtFenHu3JH8.Text = dr["I_M8"].ToString();
                    txtFenHu3JH9.Text = dr["I_M9"].ToString();

                    txtFenHu3JH10.Text = dr["I_M10"].ToString();
                    txtFenHu3JH11.Text = dr["I_M11"].ToString();
                    txtFenHu3JH12.Text = dr["I_M12"].ToString();

                    txtFenHu3JH13.Text = (Convert.ToInt32(dr["I_M1"]) + Convert.ToInt32(dr["I_M2"]) + Convert.ToInt32(dr["I_M3"])
                                        + Convert.ToInt32(dr["I_M4"]) + Convert.ToInt32(dr["I_M5"]) + Convert.ToInt32(dr["I_M6"])
                                        + Convert.ToInt32(dr["I_M7"]) + Convert.ToInt32(dr["I_M8"]) + Convert.ToInt32(dr["I_M9"])
                                        + Convert.ToInt32(dr["I_M10"]) + Convert.ToInt32(dr["I_M11"]) + Convert.ToInt32(dr["I_M12"])).ToString();
                }
                
            }
            SetSumJiHuaXX();
        }
        /// <summary>
        /// 合计信息
        /// </summary>
        public void SetSumJiHuaXX()
        {
            int m1 = Convert.ToInt32(txtFenHu1JH1.Text.Trim() == "" ? "0" : txtFenHu1JH1.Text);
            int m2 = Convert.ToInt32(txtFenHu1JH2.Text.Trim() == "" ? "0" : txtFenHu1JH2.Text);
            int m3 = Convert.ToInt32(txtFenHu1JH3.Text.Trim() == "" ? "0" : txtFenHu1JH3.Text);
            int m4 = Convert.ToInt32(txtFenHu1JH4.Text.Trim() == "" ? "0" : txtFenHu1JH4.Text);
            int m5 = Convert.ToInt32(txtFenHu1JH5.Text.Trim() == "" ? "0" : txtFenHu1JH5.Text);

            int m6 = Convert.ToInt32(txtFenHu1JH6.Text.Trim() == "" ? "0" : txtFenHu1JH6.Text);
            int m7 = Convert.ToInt32(txtFenHu1JH7.Text.Trim() == "" ? "0" : txtFenHu1JH7.Text);
            int m8 = Convert.ToInt32(txtFenHu1JH8.Text.Trim() == "" ? "0" : txtFenHu1JH8.Text);
            int m9 = Convert.ToInt32(txtFenHu1JH9.Text.Trim() == "" ? "0" : txtFenHu1JH9.Text);
            int m10 = Convert.ToInt32(txtFenHu1JH10.Text.Trim() == "" ? "0" : txtFenHu1JH10.Text);

            int m11 = Convert.ToInt32(txtFenHu1JH11.Text.Trim() == "" ? "0" : txtFenHu1JH11.Text);
            int m12 = Convert.ToInt32(txtFenHu1JH12.Text.Trim() == "" ? "0" : txtFenHu1JH12.Text);

            txtFenHu1JH13.Text = (m1 + m2 + m3 + m4 + m5 + m6 + m7 + m8 + m9 + m10 + m11 + m12).ToString(); ;

            int n1 = Convert.ToInt32(txtFenHu2JH1.Text.Trim() == "" ? "0" : txtFenHu2JH1.Text);
            int n2 = Convert.ToInt32(txtFenHu2JH2.Text.Trim() == "" ? "0" : txtFenHu2JH2.Text);
            int n3 = Convert.ToInt32(txtFenHu2JH3.Text.Trim() == "" ? "0" : txtFenHu2JH3.Text);
            int n4 = Convert.ToInt32(txtFenHu2JH4.Text.Trim() == "" ? "0" : txtFenHu2JH4.Text);
            int n5 = Convert.ToInt32(txtFenHu2JH5.Text.Trim() == "" ? "0" : txtFenHu2JH5.Text);

            int n6 = Convert.ToInt32(txtFenHu2JH6.Text.Trim() == "" ? "0" : txtFenHu2JH6.Text);
            int n7 = Convert.ToInt32(txtFenHu2JH7.Text.Trim() == "" ? "0" : txtFenHu2JH7.Text);
            int n8 = Convert.ToInt32(txtFenHu2JH8.Text.Trim() == "" ? "0" : txtFenHu2JH8.Text);
            int n9 = Convert.ToInt32(txtFenHu2JH9.Text.Trim() == "" ? "0" : txtFenHu2JH9.Text);
            int n10 = Convert.ToInt32(txtFenHu2JH10.Text.Trim() == "" ? "0" : txtFenHu2JH10.Text);

            int n11 = Convert.ToInt32(txtFenHu2JH11.Text.Trim() == "" ? "0" : txtFenHu2JH11.Text);
            int n12 = Convert.ToInt32(txtFenHu2JH12.Text.Trim() == "" ? "0" : txtFenHu2JH12.Text);
            txtFenHu2JH13.Text = (n1 + n2 + n3 + n4 + n5 + n6 + n7 + n8 + n9 + n10 + n11 + n12).ToString(); ;


            int q1 = Convert.ToInt32(txtFenHu3JH1.Text.Trim() == "" ? "0" : txtFenHu3JH1.Text);
            int q2 = Convert.ToInt32(txtFenHu3JH2.Text.Trim() == "" ? "0" : txtFenHu3JH2.Text);
            int q3 = Convert.ToInt32(txtFenHu3JH3.Text.Trim() == "" ? "0" : txtFenHu3JH3.Text);
            int q4 = Convert.ToInt32(txtFenHu3JH4.Text.Trim() == "" ? "0" : txtFenHu3JH4.Text);
            int q5 = Convert.ToInt32(txtFenHu3JH5.Text.Trim() == "" ? "0" : txtFenHu3JH5.Text);

            int q6 = Convert.ToInt32(txtFenHu3JH6.Text.Trim() == "" ? "0" : txtFenHu3JH6.Text);
            int q7 = Convert.ToInt32(txtFenHu3JH7.Text.Trim() == "" ? "0" : txtFenHu3JH7.Text);
            int q8 = Convert.ToInt32(txtFenHu3JH8.Text.Trim() == "" ? "0" : txtFenHu3JH8.Text);
            int q9 = Convert.ToInt32(txtFenHu3JH9.Text.Trim() == "" ? "0" : txtFenHu3JH9.Text);
            int q10 = Convert.ToInt32(txtFenHu3JH10.Text.Trim() == "" ? "0" : txtFenHu3JH10.Text);

            int q11 = Convert.ToInt32(txtFenHu3JH11.Text.Trim() == "" ? "0" : txtFenHu3JH11.Text);
            int q12 = Convert.ToInt32(txtFenHu3JH12.Text.Trim() == "" ? "0" : txtFenHu3JH12.Text);

            txtFenHu3JH13.Text = (q1 + q2 + q3 + q4 + q5 + q6 + q7 + q8 + q9 + q10 + q11 + q12).ToString();

            txtHeJiJH1.Text = (m1 + n1 + q1).ToString();
            txtHeJiJH2.Text = (m2 + n2 + q2).ToString();
            txtHeJiJH3.Text = (m3 + n3 + q3).ToString();
            txtHeJiJH4.Text = (m4 + n4 + q4).ToString();
            txtHeJiJH5.Text = (m5 + n5 + q5).ToString();

            txtHeJiJH6.Text = (m6 + n6 + q6).ToString();
            txtHeJiJH7.Text = (m7 + n7 + q7).ToString();
            txtHeJiJH8.Text = (m8 + n8 + q8).ToString();
            txtHeJiJH9.Text = (m9 + n9 + q9).ToString();
            txtHeJiJH10.Text = (m10 + n10 + q10).ToString();

            txtHeJiJH11.Text = (m11 + n11 + q11).ToString();
            txtHeJiJH12.Text = (m12 + n12 + q12).ToString();

            txtHeJiJH13.Text = (Convert.ToInt32(txtFenHu1JH13.Text) + Convert.ToInt32(txtFenHu2JH13.Text) + Convert.ToInt32(txtFenHu3JH13.Text)).ToString();

        }
        /// <summary>
        /// 分户设置文本框状态
        /// </summary>
        /// <param name="enabled"></param>
        public void SetFenHuTxTModel(bool enabled)
        {
            System.Drawing.Color color = System.Drawing.Color.Transparent;
            if (!enabled)
            {
                txtFenHu3JH1.BackColor = color;
                txtFenHu3JH2.BackColor = color;
                txtFenHu3JH3.BackColor = color;
                txtFenHu3JH4.BackColor = color;
                txtFenHu3JH5.BackColor = color;

                txtFenHu3JH6.BackColor = color;
                txtFenHu3JH7.BackColor = color;
                txtFenHu3JH8.BackColor = color;
                txtFenHu3JH9.BackColor = color;
                txtFenHu3JH10.BackColor = color;

                txtFenHu3JH11.BackColor = color;
                txtFenHu3JH12.BackColor = color;
                txtFenHu3JH13.BackColor = color;

                PageTools.SetDisabled(txtFenHu3JH1, true);
                PageTools.SetDisabled(txtFenHu3JH2, true);
                PageTools.SetDisabled(txtFenHu3JH3, true);
                PageTools.SetDisabled(txtFenHu3JH4, true);
                PageTools.SetDisabled(txtFenHu3JH5, true);

                PageTools.SetDisabled(txtFenHu3JH6, true);
                PageTools.SetDisabled(txtFenHu3JH7, true);
                PageTools.SetDisabled(txtFenHu3JH8, true);
                PageTools.SetDisabled(txtFenHu3JH9, true);
                PageTools.SetDisabled(txtFenHu3JH10, true);

                PageTools.SetDisabled(txtFenHu3JH11, true);
                PageTools.SetDisabled(txtFenHu3JH12, true);
               // PageTools.SetDisabled(txtFenHu3JH13, true);
            }
            else
            {
                PageTools.SetDisabled(txtFenHu3JH1, false);
                PageTools.SetDisabled(txtFenHu3JH2, false);
                PageTools.SetDisabled(txtFenHu3JH3, false);
                PageTools.SetDisabled(txtFenHu3JH4, false);
                PageTools.SetDisabled(txtFenHu3JH5, false);

                PageTools.SetDisabled(txtFenHu3JH6, false);
                PageTools.SetDisabled(txtFenHu3JH7, false);
                PageTools.SetDisabled(txtFenHu3JH8, false);
                PageTools.SetDisabled(txtFenHu3JH9, false);
                PageTools.SetDisabled(txtFenHu3JH10, false);

                PageTools.SetDisabled(txtFenHu3JH11, false);
                PageTools.SetDisabled(txtFenHu3JH12, false);
                //PageTools.SetDisabled(txtFenHu3JH13, false);


                color = System.Drawing.Color.Transparent;

                txtFenHu3JH1.BackColor = color;
                txtFenHu3JH2.BackColor = color;
                txtFenHu3JH3.BackColor = color;
                txtFenHu3JH4.BackColor = color;
                txtFenHu3JH5.BackColor = color;

                txtFenHu3JH6.BackColor = color;
                txtFenHu3JH7.BackColor = color;
                txtFenHu3JH8.BackColor = color;
                txtFenHu3JH9.BackColor = color;
                txtFenHu3JH10.BackColor = color;

                txtFenHu3JH11.BackColor = color;
                txtFenHu3JH12.BackColor = color;
                txtFenHu3JH13.BackColor = color;
            }
        }
        /// <summary>
        /// 计划信息赋值
        /// </summary>
        /// <param name="type"></param>
        /// <param name="values"></param>
        public void SetFenHuJHXX(int type,string []values)
        {
            if (values.Length < 12)
            {
                return;
            }
            else
            {
                if (type == 1)
                {
                    txtFenHu1JH1.Text = values[0];
                    txtFenHu1JH2.Text = values[1];
                    txtFenHu1JH3.Text = values[2];
                    txtFenHu1JH4.Text = values[3];
                    txtFenHu1JH5.Text = values[4];

                    txtFenHu1JH6.Text = values[5];
                    txtFenHu1JH7.Text = values[6];
                    txtFenHu1JH8.Text = values[7];
                    txtFenHu1JH9.Text = values[8];
                    txtFenHu1JH10.Text = values[9];

                    txtFenHu1JH11.Text = values[10];
                    txtFenHu1JH12.Text = values[11];
                    int sum = 0;
                    for (int i = 0; i < values.Length; i++)
                    {
                        sum+= Convert.ToInt32(values[i]);
                    }
                    txtFenHu1JH13.Text = sum.ToString(); 
                }
                else if (type == 2)
                {
                    txtFenHu2JH1.Text = values[0];
                    txtFenHu2JH2.Text = values[1];
                    txtFenHu2JH3.Text = values[2];
                    txtFenHu2JH4.Text = values[3];
                    txtFenHu2JH5.Text = values[4];

                    txtFenHu2JH6.Text = values[5];
                    txtFenHu2JH7.Text = values[6];
                    txtFenHu2JH8.Text = values[7];
                    txtFenHu2JH9.Text = values[8];
                    txtFenHu2JH10.Text = values[9];

                    txtFenHu2JH11.Text = values[10];
                    txtFenHu2JH12.Text = values[11];
                    
                    int sum = 0;
                    for (int i = 0; i < values.Length; i++)
                    {
                        sum += Convert.ToInt32(values[i]);
                    }
                    txtFenHu2JH13.Text = sum.ToString(); 
                }
                else if (type == 3)
                {
                    txtFenHu3JH1.Text = values[0];
                    txtFenHu3JH2.Text = values[1];
                    txtFenHu3JH3.Text = values[2];
                    txtFenHu3JH4.Text = values[3];
                    txtFenHu3JH5.Text = values[4];

                    txtFenHu3JH6.Text = values[5];
                    txtFenHu3JH7.Text = values[6];
                    txtFenHu3JH8.Text = values[7];
                    txtFenHu3JH9.Text = values[8];
                    txtFenHu3JH10.Text = values[9];

                    txtFenHu3JH11.Text = values[10];
                    txtFenHu3JH12.Text = values[11];
                   
                    int sum = 0;
                    for (int i = 0; i < values.Length; i++)
                    {
                        sum += Convert.ToInt32(values[i]);
                    }
                    txtFenHu3JH13.Text = sum.ToString(); 
                }
            }
        }

        public void SetEnabledTXT(bool status)
        {
            //分户3
            PageTools.SetDisabled(txtFenHu3JH1, status);
            PageTools.SetDisabled(txtFenHu3JH2, status);
            PageTools.SetDisabled(txtFenHu3JH3, status);
            PageTools.SetDisabled(txtFenHu3JH4, status);
            PageTools.SetDisabled(txtFenHu3JH5, status);

            PageTools.SetDisabled(txtFenHu3JH6, status);
            PageTools.SetDisabled(txtFenHu3JH7, status);
            PageTools.SetDisabled(txtFenHu3JH8, status);
            PageTools.SetDisabled(txtFenHu3JH9, status);
            PageTools.SetDisabled(txtFenHu3JH10, status);

            PageTools.SetDisabled(txtFenHu3JH11, status);
            PageTools.SetDisabled(txtFenHu3JH12, status);
            PageTools.SetDisabled(txtFenHu3JH13, status);


            //分户2
            PageTools.SetDisabled(txtFenHu2JH1, status);
            PageTools.SetDisabled(txtFenHu2JH2, status);
            PageTools.SetDisabled(txtFenHu2JH3, status);
            PageTools.SetDisabled(txtFenHu2JH4, status);
            PageTools.SetDisabled(txtFenHu2JH5, status);

            PageTools.SetDisabled(txtFenHu2JH6, status);
            PageTools.SetDisabled(txtFenHu2JH7, status);
            PageTools.SetDisabled(txtFenHu2JH8, status);
            PageTools.SetDisabled(txtFenHu2JH9, status);
            PageTools.SetDisabled(txtFenHu2JH10, status);

            PageTools.SetDisabled(txtFenHu2JH11, status);
            PageTools.SetDisabled(txtFenHu2JH12, status);
            PageTools.SetDisabled(txtFenHu2JH13, status);

            //分户1
            PageTools.SetDisabled(txtFenHu1JH1, status);
            PageTools.SetDisabled(txtFenHu1JH2, status);
            PageTools.SetDisabled(txtFenHu1JH3, status);
            PageTools.SetDisabled(txtFenHu1JH4, status);
            PageTools.SetDisabled(txtFenHu1JH5, status);

            PageTools.SetDisabled(txtFenHu1JH6, status);
            PageTools.SetDisabled(txtFenHu1JH7, status);
            PageTools.SetDisabled(txtFenHu1JH8, status);
            PageTools.SetDisabled(txtFenHu1JH9, status);
            PageTools.SetDisabled(txtFenHu1JH10, status);

            PageTools.SetDisabled(txtFenHu1JH11, status);
            PageTools.SetDisabled(txtFenHu1JH12, status);
            PageTools.SetDisabled(txtFenHu1JH13, status);


        }

        public string CheckFenHuJHXX(out bool isYes)
        {
            isYes = false;
            UCLHFenHuDJXX uc = this.Parent.FindControl("UCLHFenHuDJXX") as UCLHFenHuDJXX;
            if (uc != null)
            {
                int val = 0;
                if (!int.TryParse(txtFenHu1JH1.Text, out val))
                {
                    txtFenHu1JH1.Focus();
                    return "（分户1）1月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH1.Text)<500)
                {
                    txtFenHu1JH1.Focus();
                    return "单月计划量最低为500";
                }

                if (!int.TryParse(txtFenHu1JH2.Text, out val))
                {
                    txtFenHu1JH2.Focus();
                    return "（分户1）2月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH2.Text)<500)
                {
                    txtFenHu1JH2.Focus();
                    return "单月计划量最低为500";
                }

                if (!int.TryParse(txtFenHu1JH3.Text, out val))
                {
                    txtFenHu1JH3.Focus();
                    return "（分户1）3月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH3.Text) < 500)
                {
                    txtFenHu1JH3.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH4.Text, out val))
                {
                    txtFenHu1JH4.Focus();
                    return "（分户1）4月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH4.Text) < 500)
                {
                    txtFenHu1JH4.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH5.Text, out val))
                {
                    txtFenHu1JH5.Focus();
                    return "（分户1）5月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH5.Text) < 500)
                {
                    txtFenHu1JH5.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH6.Text, out val))
                {
                    txtFenHu1JH6.Focus();
                    return "（分户1）6月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH6.Text) < 500)
                {
                    txtFenHu1JH6.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH7.Text, out val))
                {
                    txtFenHu1JH7.Focus();
                    return "（分户1）7月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH7.Text) < 500)
                {
                    txtFenHu1JH7.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH8.Text, out val))
                {
                    txtFenHu1JH8.Focus();
                    return "（分户1）8月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH8.Text) < 500)
                {
                    txtFenHu1JH8.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH9.Text, out val))
                {
                    txtFenHu1JH9.Focus();
                    return "（分户1）9月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH9.Text) < 500)
                {
                    txtFenHu1JH9.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH10.Text, out val))
                {
                    txtFenHu1JH10.Focus();
                    return "（分户1）10月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH10.Text) < 500)
                {
                    txtFenHu1JH10.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH11.Text, out val))
                {
                    txtFenHu1JH11.Focus();
                    return "（分户1）11月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH11.Text) < 500)
                {
                    txtFenHu1JH11.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu1JH12.Text, out val))
                {
                    txtFenHu1JH12.Focus();
                    return "（分户1）12月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu1JH12.Text) < 500)
                {
                    txtFenHu1JH12.Focus();
                    return "单月计划量最低为500";
                }




                if (!int.TryParse(txtFenHu2JH1.Text, out val))
                {
                    txtFenHu2JH1.Focus();
                    return "（分户2）1月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH1.Text) < 500)
                {
                    txtFenHu2JH1.Focus();
                    return "单月计划量最低为500";
                }

                if (!int.TryParse(txtFenHu2JH2.Text, out val))
                {
                    txtFenHu2JH2.Focus();
                    return "（分户2）2月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH2.Text) < 500)
                {
                    txtFenHu2JH2.Focus();
                    return "单月计划量最低为500";
                }

                if (!int.TryParse(txtFenHu2JH3.Text, out val))
                {
                    txtFenHu2JH3.Focus();
                    return "（分户2）3月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH3.Text) < 500)
                {
                    txtFenHu2JH3.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH4.Text, out val))
                {
                    txtFenHu2JH4.Focus();
                    return "（分户2）4月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH4.Text) < 500)
                {
                    txtFenHu2JH4.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH5.Text, out val))
                {
                    txtFenHu2JH5.Focus();
                    return "（分户2）5月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH5.Text) < 500)
                {
                    txtFenHu2JH5.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH6.Text, out val))
                {
                    txtFenHu2JH6.Focus();
                    return "（分户2）6月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH6.Text) < 500)
                {
                    txtFenHu2JH6.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH7.Text, out val))
                {
                    txtFenHu2JH7.Focus();
                    return "（分户2）7月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH7.Text) < 500)
                {
                    txtFenHu2JH7.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH8.Text, out val))
                {
                    txtFenHu2JH8.Focus();
                    return "（分户2）8月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH8.Text) < 500)
                {
                    txtFenHu2JH8.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH9.Text, out val))
                {
                    txtFenHu2JH9.Focus();
                    return "（分户2）9月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH9.Text) < 500)
                {
                    txtFenHu2JH9.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH10.Text, out val))
                {
                    txtFenHu2JH10.Focus();
                    return "（分户2）10月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH10.Text) < 500)
                {
                    txtFenHu2JH10.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH11.Text, out val))
                {
                    txtFenHu2JH11.Focus();
                    return "（分户2）11月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH11.Text) < 500)
                {
                    txtFenHu2JH11.Focus();
                    return "单月计划量最低为500";
                }
                if (!int.TryParse(txtFenHu2JH12.Text, out val))
                {
                    txtFenHu2JH12.Focus();
                    return "（分户2）12月计划信息输入错误";
                }
                else if (Convert.ToInt32(txtFenHu2JH12.Text) < 500)
                {
                    txtFenHu2JH12.Focus();
                    return "单月计划量最低为500";
                }


                if (uc.YongHu3Checked)
                {
                    if (!int.TryParse(txtFenHu3JH1.Text, out val))
                    {
                        txtFenHu3JH1.Focus();
                        return "（分户3）1月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH1.Text) < 500)
                    {
                        txtFenHu3JH1.Focus();
                        return "单月计划量最低为500";
                    }

                    if (!int.TryParse(txtFenHu3JH2.Text, out val))
                    {
                        txtFenHu3JH2.Focus();
                        return "（分户3）2月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH2.Text) < 500)
                    {
                        txtFenHu3JH2.Focus();
                        return "单月计划量最低为500";
                    }

                    if (!int.TryParse(txtFenHu3JH3.Text, out val))
                    {
                        txtFenHu3JH3.Focus();
                        return "（分户3）3月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH3.Text) < 500)
                    {
                        txtFenHu3JH3.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH4.Text, out val))
                    {
                        txtFenHu3JH4.Focus();
                        return "（分户3）4月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH4.Text) < 500)
                    {
                        txtFenHu3JH4.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH5.Text, out val))
                    {
                        txtFenHu3JH5.Focus();
                        return "（分户3）5月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH5.Text) < 500)
                    {
                        txtFenHu3JH5.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH6.Text, out val))
                    {
                        txtFenHu3JH6.Focus();
                        return "（分户3）6月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH6.Text) < 500)
                    {
                        txtFenHu3JH6.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH7.Text, out val))
                    {
                        txtFenHu3JH7.Focus();
                        return "（分户3）7月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH7.Text) < 500)
                    {
                        txtFenHu3JH7.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH8.Text, out val))
                    {
                        txtFenHu3JH8.Focus();
                        return "（分户3）8月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH8.Text) < 500)
                    {
                        txtFenHu3JH8.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH9.Text, out val))
                    {
                        txtFenHu3JH9.Focus();
                        return "（分户3）9月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH9.Text) < 500)
                    {
                        txtFenHu3JH9.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH10.Text, out val))
                    {
                        txtFenHu3JH10.Focus();
                        return "（分户3）10月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH10.Text) < 500)
                    {
                        txtFenHu3JH10.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH11.Text, out val))
                    {
                        txtFenHu3JH11.Focus();
                        return "（分户3）11月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH11.Text) < 500)
                    {
                        txtFenHu3JH11.Focus();
                        return "单月计划量最低为500";
                    }
                    if (!int.TryParse(txtFenHu3JH12.Text, out val))
                    {
                        txtFenHu3JH12.Focus();
                        return "（分户3）12月计划信息输入错误";
                    }
                    else if (Convert.ToInt32(txtFenHu3JH12.Text) < 500)
                    {
                        txtFenHu3JH12.Focus();
                        return "单月计划量最低为500";
                    }
                }
                isYes = true;
                return "1";
            }
            return "";
        }

        private void ClearFenHuValue()
        {
            //分户1
            txtFenHu1JH1.Text = "0";
            txtFenHu1JH2.Text = "0";
            txtFenHu1JH3.Text = "0";
            txtFenHu1JH4.Text = "0";
            txtFenHu1JH5.Text = "0";
            txtFenHu1JH6.Text = "0";
            txtFenHu1JH7.Text = "0";
            txtFenHu1JH8.Text = "0";
            txtFenHu1JH9.Text = "0";
            txtFenHu1JH10.Text = "0";
            txtFenHu1JH11.Text = "0";
            txtFenHu1JH12.Text = "0";
            txtFenHu1JH13.Text = "0";

            ///分户2
            txtFenHu2JH1.Text = "0";
            txtFenHu2JH2.Text = "0";
            txtFenHu2JH3.Text = "0";
            txtFenHu2JH4.Text = "0";
            txtFenHu2JH5.Text = "0";
            txtFenHu2JH6.Text = "0";
            txtFenHu2JH7.Text = "0";
            txtFenHu2JH8.Text = "0";
            txtFenHu2JH9.Text = "0";
            txtFenHu2JH10.Text = "0";
            txtFenHu2JH11.Text = "0";
            txtFenHu2JH12.Text = "0";
            txtFenHu2JH13.Text = "0";
            //分户3
            txtFenHu3JH1.Text = "0";
            txtFenHu3JH2.Text = "0";
            txtFenHu3JH3.Text = "0";
            txtFenHu3JH4.Text = "0";
            txtFenHu3JH5.Text = "0";
            txtFenHu3JH6.Text = "0";
            txtFenHu3JH7.Text = "0";
            txtFenHu3JH8.Text = "0";
            txtFenHu3JH9.Text = "0";
            txtFenHu3JH10.Text = "0";
            txtFenHu3JH11.Text = "0";
            txtFenHu3JH12.Text = "0";
            txtFenHu3JH13.Text = "0";

            //原计划
            txtFenHuYJH1.Text = "0";
            txtFenHuYJH2.Text = "0";
            txtFenHuYJH3.Text = "0";
            txtFenHuYJH4.Text = "0";
            txtFenHuYJH5.Text = "0";
            txtFenHuYJH6.Text = "0";
            txtFenHuYJH7.Text = "0";
            txtFenHuYJH8.Text = "0";
            txtFenHuYJH9.Text = "0";
            txtFenHuYJH10.Text = "0";
            txtFenHuYJH11.Text = "0";
            txtFenHuYJH12.Text = "0";
            txtFenHuYJH13.Text = "0";

            //近一年
            txtFenHuSY1.Text = "0";
            txtFenHuSY2.Text = "0";
            txtFenHuSY3.Text = "0";
            txtFenHuSY4.Text = "0";
            txtFenHuSY5.Text = "0";
            txtFenHuSY6.Text = "0";
            txtFenHuSY7.Text = "0";
            txtFenHuSY8.Text = "0";
            txtFenHuSY9.Text = "0";
            txtFenHuSY10.Text = "0";
            txtFenHuSY11.Text = "0";
            txtFenHuSY12.Text = "0";
            txtFenHuSY13.Text = "0";
        }
        public void AddFenHuXX(int type, YS_LH_LAIHANXX laihanxx,string YongHuH)
        {
            OperateState operateState = OperateState.Add;
            YS_LH_FENHUXX fhxx = new YS_LH_FENHUXX();
            int waterYM = BusinessTool.GetWaterYM();
            int y = Convert.ToInt32(waterYM.ToString().Substring(0,4));
            fhxx.D_CAOZUORQ = DateTime.Now;
            fhxx.I_Y = y;
            fhxx.ID = 0;
            fhxx.I_JLZT = 0;
            fhxx.S_CAOZUOR = LoginInfo.CurrentUser.UserID.ToString();
            fhxx.S_YONGHUH = YongHuH;
            fhxx.S_LAIHANBH = laihanxx.S_LAIHANBH;
            fhxx.S_YONGHUHFATHER = laihanxx.S_YONGHUBH;
            string where = " S_LAIHANBH='{0}' and S_YONGHUH='{1}' and S_YONGHUHFATHER='{2}' and i_JLZT=0 ";

            
            where = string.Format(where,laihanxx.S_LAIHANBH,YongHuH,laihanxx.S_YONGHUBH);
            DataTable dt = BllFenHuXX.SelectYS_LH_FENHUXXesDynamic(where, "", null);
            if (dt != null && dt.Rows.Count > 0)
            {
                fhxx.ID = Convert.ToInt32(dt.Rows[0]["ID"]);
                operateState = OperateState.Modify;
            }
            if (type == 1)
            {
                fhxx.I_M1 = Convert.ToInt32(txtFenHu1JH1.Text);
                fhxx.I_M2 = Convert.ToInt32(txtFenHu1JH2.Text);
                fhxx.I_M3 = Convert.ToInt32(txtFenHu1JH3.Text);
                fhxx.I_M4 = Convert.ToInt32(txtFenHu1JH4.Text);
                fhxx.I_M5 = Convert.ToInt32(txtFenHu1JH5.Text);

                fhxx.I_M6 = Convert.ToInt32(txtFenHu1JH6.Text);
                fhxx.I_M7 = Convert.ToInt32(txtFenHu1JH7.Text);
                fhxx.I_M8 = Convert.ToInt32(txtFenHu1JH8.Text);
                fhxx.I_M9 = Convert.ToInt32(txtFenHu1JH9.Text);
                fhxx.I_M10 = Convert.ToInt32(txtFenHu1JH10.Text);

                fhxx.I_M11 = Convert.ToInt32(txtFenHu1JH11.Text);
                fhxx.I_M12 = Convert.ToInt32(txtFenHu1JH12.Text);
            }
            else if (type == 2)
            {
                fhxx.I_M1 = Convert.ToInt32(txtFenHu2JH1.Text);
                fhxx.I_M2 = Convert.ToInt32(txtFenHu2JH2.Text);
                fhxx.I_M3 = Convert.ToInt32(txtFenHu2JH3.Text);
                fhxx.I_M4 = Convert.ToInt32(txtFenHu2JH4.Text);
                fhxx.I_M5 = Convert.ToInt32(txtFenHu2JH5.Text);

                fhxx.I_M6 = Convert.ToInt32(txtFenHu2JH6.Text);
                fhxx.I_M7 = Convert.ToInt32(txtFenHu2JH7.Text);
                fhxx.I_M8 = Convert.ToInt32(txtFenHu2JH8.Text);
                fhxx.I_M9 = Convert.ToInt32(txtFenHu2JH9.Text);
                fhxx.I_M10 = Convert.ToInt32(txtFenHu2JH10.Text);

                fhxx.I_M11 = Convert.ToInt32(txtFenHu2JH11.Text);
                fhxx.I_M12 = Convert.ToInt32(txtFenHu2JH12.Text);
            }
            else if (type == 3)
            {
                fhxx.I_M1 = Convert.ToInt32(txtFenHu3JH1.Text);
                fhxx.I_M2 = Convert.ToInt32(txtFenHu3JH2.Text);
                fhxx.I_M3 = Convert.ToInt32(txtFenHu3JH3.Text);
                fhxx.I_M4 = Convert.ToInt32(txtFenHu3JH4.Text);
                fhxx.I_M5 = Convert.ToInt32(txtFenHu3JH5.Text);

                fhxx.I_M6 = Convert.ToInt32(txtFenHu3JH6.Text);
                fhxx.I_M7 = Convert.ToInt32(txtFenHu3JH7.Text);
                fhxx.I_M8 = Convert.ToInt32(txtFenHu3JH8.Text);
                fhxx.I_M9 = Convert.ToInt32(txtFenHu3JH9.Text);
                fhxx.I_M10 = Convert.ToInt32(txtFenHu3JH10.Text);

                fhxx.I_M11 = Convert.ToInt32(txtFenHu3JH11.Text);
                fhxx.I_M12 = Convert.ToInt32(txtFenHu3JH12.Text);
            }
            _SYS_LOGBLL.Log<YS_LH_FENHUXX>(LoginInfo.CurrentUser, BusinessTool.WType.ToString(), "来函管理-分户流程", operateState, fhxx, null);
            BllFenHuXX.InsertOrUpdate(fhxx);
            
               
        }
        #endregion
    }
}